validate entities within a subdocument
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Wed Feb 01, 2006 2:21 pm
validate entities within a subdocument
Hi!
I'm working on a docbook project, which splits up a book into separate files for each chapter. We would like to use entities for several centralized parameters. However, Oxygen does not validate the subdocuments, since all entities are loaded in the "main"-file. It is unable to find the declaration of the entities (but I can render it without any problem).
entities.ent:
ourbook.xml:
chapter1.xml:
Is there any way to get Oxygen validate this structure?
I'm working on a docbook project, which splits up a book into separate files for each chapter. We would like to use entities for several centralized parameters. However, Oxygen does not validate the subdocuments, since all entities are loaded in the "main"-file. It is unable to find the declaration of the entities (but I can render it without any problem).
entities.ent:
Code: Select all
<!ENTITY javadoc "http://java.sun.com/j2se/1.4.2/docs/api/index.html">
[...]
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY Chapter1 SYSTEM "chapter1.xml">
<!ENTITY % entities SYSTEM "../entities.ent">
%entities;
]>
<book>
[...]
&Chapter1;
[...]
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="chapter1">
[..]
<para>Further information can be looked up at &javadoc;</para>
[...]
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
One option is to add all the files that you want to validate to the same <oXygen/> project created in the Project view, select them one by one with Ctrl + left click in the Project view, right-click and select Validate selection with .... In the dialog which is displayed select the schema / DTD used to validate the files. You can find the DocBook DTD in [oXygen-install-folder]/frameworks/docbook/dtd, so you don't have to browse remotely for it (press the Browse for local file button, not the Browse for remote file one). If you want to validate all the files of the project with one action just right-click on the project root and execute Validate selection with .... Please note that this action is available starting with version 7.0 of <oXygen/>.
Other option which works also in previous versions of <oXygen/> is to include the chapter files into the main book file using XInclude instead of entity references. This allows you to include a DOCTYPE / schema declaration in every file which enables you to validate each one individually.
Regards,
Sorin
One option is to add all the files that you want to validate to the same <oXygen/> project created in the Project view, select them one by one with Ctrl + left click in the Project view, right-click and select Validate selection with .... In the dialog which is displayed select the schema / DTD used to validate the files. You can find the DocBook DTD in [oXygen-install-folder]/frameworks/docbook/dtd, so you don't have to browse remotely for it (press the Browse for local file button, not the Browse for remote file one). If you want to validate all the files of the project with one action just right-click on the project root and execute Validate selection with .... Please note that this action is available starting with version 7.0 of <oXygen/>.
Other option which works also in previous versions of <oXygen/> is to include the chapter files into the main book file using XInclude instead of entity references. This allows you to include a DOCTYPE / schema declaration in every file which enables you to validate each one individually.
Regards,
Sorin
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Adding to what Sorin said: you need to create a DTD that includes the DocBook DTD and the new entity declarations and perform the external validation against that DTD. Also you can perform the association with this DTD externally using the default schema associations from options, for instance you can associate this DTD with the document having the root element chapter.
Best Regards,
George
Best Regards,
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