Standard XInclude Support
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Fri Mar 04, 2005 2:55 am
Standard XInclude Support
Hello. I'm building a DocBook project, and using XInclude to break up the source into modules (following Bob Stayton's example at http://www.sagehill.net/docbookxsl/ModularDoc.html). I can validate my project with libxml2 using the command "xmllint --noout --xinclude --postvalid --noent SA-XInclude.xml".
However, when I import the project into Oxygen, it fails validation with the error "Element type "xi:include" must be declared". I see from Oxygen's template examples that XInclude support is implemented via an entity declaration that points to "xinclude.mod", a component bundled with Oxygen. If I add that entity declaration and enable XInclude processing in the Prefs, my project validates.
The problem is that my project must be machine-agnostic; that is, it must validate on any machine, not just machines where Oxygen is installed. Does Oxygen only support an application-specific implementation of XInclude? Is it possible to implement validation within Oxygen using libxml2?
Thanks for your help.
Jennifer.
However, when I import the project into Oxygen, it fails validation with the error "Element type "xi:include" must be declared". I see from Oxygen's template examples that XInclude support is implemented via an entity declaration that points to "xinclude.mod", a component bundled with Oxygen. If I add that entity declaration and enable XInclude processing in the Prefs, my project validates.
The problem is that my project must be machine-agnostic; that is, it must validate on any machine, not just machines where Oxygen is installed. Does Oxygen only support an application-specific implementation of XInclude? Is it possible to implement validation within Oxygen using libxml2?
Thanks for your help.
Jennifer.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Jennifer,
The libxml makes a preprocessing when you use the --xinclude option and replaces the xi:include with the actual content. oXygen uses Xerces for performing validation and this preprocessing step is not performed so the DTD must be customized to allow xi:include element. All these are also described at
http://www.sagehill.net/docbookxsl/Xinclude.html
Using Xerces-J to validate XIncludes
The file must also validate before the XIncludes are resolved, which means the xi:include element must be in the DTD. See the section “DTD customizations for XIncludes†for more information.
and follow to
http://www.sagehill.net/docbookxsl/Vali ... includeDTD
which is almost the same customization that oXygen adds.
Hope that helps,
George
The libxml makes a preprocessing when you use the --xinclude option and replaces the xi:include with the actual content. oXygen uses Xerces for performing validation and this preprocessing step is not performed so the DTD must be customized to allow xi:include element. All these are also described at
http://www.sagehill.net/docbookxsl/Xinclude.html
Using Xerces-J to validate XIncludes
The file must also validate before the XIncludes are resolved, which means the xi:include element must be in the DTD. See the section “DTD customizations for XIncludes†for more information.
and follow to
http://www.sagehill.net/docbookxsl/Vali ... includeDTD
which is almost the same customization that oXygen adds.
Hope that helps,
George
-
- Posts: 2
- Joined: Fri Mar 04, 2005 2:55 am
Is there any intention to enhance Oxygen to allow users to configure their own validation mechanism?george wrote:The libxml makes a preprocessing when you use the --xinclude option and replaces the xi:include with the actual content. oXygen uses Xerces for performing validation
Thanks again for your help, George.
jen.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Jennifer,
You may use the external tool support to configure a validation with a different engine if you want. Basically there you specify a command line and you can use a few macros (there are 11 such macros currently) to dynamically express some parts of that command line. To refer to the current file you can use ${cf}.
Best Regards,
George
You may use the external tool support to configure a validation with a different engine if you want. Basically there you specify a command line and you can use a few macros (there are 11 such macros currently) to dynamically express some parts of that command line. To refer to the current file you can use ${cf}.
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