DTD Validation with XInclude and catalogs
This should cover W3C XML Schema, Relax NG and DTD related problems.
DTD Validation with XInclude and catalogs
Hi!
I have a problem with validating a document within oXygen 5.1.
I have a main document similar to this:
The directory mikrovroot in the xinclude's href is a fictive directory, which is mapped to a real directory by a catalog entry.
Validating this gives an error because the parser uses the href as is, without using the catalog entry. Transforming it to, e.g., PDF works fine - just to point out that XIncludes and the catalog works fine in other contexts. Validating on the command line with xmllint also works fine. Validating with XIncludes disabled in settings also works fine (I have added the xi:include element in my customization of DocBook).
How can I tell the parser to use catalogs when resolving the href in XIncludes?
Best regards,
Rune Lausen
I have a problem with validating a document within oXygen 5.1.
I have a main document similar to this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book
PUBLIC "-//MIKROV//DTD DocBook XML V4.3-based Extension Mikrov V1.0//EN"
"http://someserver.ddd/docbook/schema/mikrov/dtd/mikrov.dtd">
<book>
<title>Help</title>
<xi:include href="file:///mikrovroot/development/components/reader/documents/help/help.dbx"/>
</book>
Validating this gives an error because the parser uses the href as is, without using the catalog entry. Transforming it to, e.g., PDF works fine - just to point out that XIncludes and the catalog works fine in other contexts. Validating on the command line with xmllint also works fine. Validating with XIncludes disabled in settings also works fine (I have added the xi:include element in my customization of DocBook).
How can I tell the parser to use catalogs when resolving the href in XIncludes?
Best regards,
Rune Lausen
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hi,
I tried with the same fictive path and it worked. You use rewriteURI in your catalog ? For validation you need rewriteSystem or system. If it doesn't work please post your catalog file.
Best Regards,
Sorin
I tried with the same fictive path and it worked. You use rewriteURI in your catalog ? For validation you need rewriteSystem or system. If it doesn't work please post your catalog file.
Best Regards,
Sorin
It worked! Thank you very very much!sorin wrote:Hi,
I tried with the same fictive path and it worked. You use rewriteURI in your catalog ? For validation you need rewriteSystem or system. If it doesn't work please post your catalog file.
Best Regards,
Sorin
I did use rewriteURI, as per Bob Staytons excellent book on DocBook XSL stylesheets. I did'nt realize that the interpretation (system vs. URI) was different when validating. In retrospect it seems logical, since DTDs only references PUBLIC og SYSTEM identifiers, whereas stylesheets always uses URIs.
With both a rewriteURI and a rewriteSystem everything works like a charm.
Thanks again!
Best regards
Rune
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