Using a DTD as a template
Having trouble installing Oxygen? Got a bug to report? Post it all here.
Using a DTD as a template
Post by petef »
I want to write a Simplified DocBook article. I have the the dtd (http://www.oasis-open.org/docbook/xml/s ... ocbook.dtd) but I can't seem to get Oxygen to use it as a template for a new xml document. I've tried various things including dropping it in the docbook folder and restarting (which did nothing) and using the Add to templates menu option which meant that my new empty document was just a copy of the DTD rather than conforming to it. I'm guessing that a simple entry in my templates.xml file will do the trick but I can't find anything in the help about what format this should take.
Please help.
Please help.
Hi,
If you have a DTD and you want to create a document based on that you can follow the steps below:
Now you can start editing. At any time you can add a document template based on your document. For instance if you edit the document to contain
and then choose from File menu the Add to templates option and enter My article as the template name for instance, then when you choose New from templates and select the User defined templates you will see My article listed there. The user defined templates are stored in the user home directory under com.oxygenxml/templates.xml. You can publish this file and use the load templates from URL option to access them.
All the best,
George
If you have a DTD and you want to create a document based on that you can follow the steps below:
- Go to File and select New
- Select XML Document and click Ok
- Click on the DTD tab
- Enter http://www.oasis-open.org/docbook/xml/s ... ocbook.dtd in the SystemID input field
- Press enter - the root element combo will be filled with possible root elements for your document
- Choose article
- Press Ok
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article SYSTEM
"http://www.oasis-open.org/docbook/xml/simple/1.0/sdocbook.dtd">
<article>
</article>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article SYSTEM
"http://www.oasis-open.org/docbook/xml/simple/1.0/sdocbook.dtd">
<article>
<title>Article title</title>
<section>
<title>Section 1</title>
<para>Section content</para>
</section>
</article>
All the best,
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service