Xinclude a document with a different namespace
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 107
- Joined: Mon Jul 30, 2007 11:31 pm
- Location: College Park, MD, United States
Xinclude a document with a different namespace
Okay, I have a Docbook 5 RC5 file that validates. Inside this document I have an XInclude element that references another XML document. This second document, however, has a different namespace and element structure. This document has a custom schema that I wrote.
After some searching I added the xi:fallback element and discovered that the included document is not being properly included. (At least, the fallback element is being output when I transform the Docbook file to HTML.)
What can I do to repair this failed XInclude?
After some searching I added the xi:fallback element and discovered that the included document is not being properly included. (At least, the fallback element is being output when I transform the Docbook file to HTML.)
What can I do to repair this failed XInclude?
-- Zearin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
If the document specified in the href attribute of the xi:include element is not included then you should check that you have XInclude enabled in Options -> Preferences -> XML -> XML Parser -- XInclude Options. If it is enabled please post some sample files that show the problem.
Regards,
Sorin
If the document specified in the href attribute of the xi:include element is not included then you should check that you have XInclude enabled in Options -> Preferences -> XML -> XML Parser -- XInclude Options. If it is enabled please post some sample files that show the problem.
Regards,
Sorin
-
- Posts: 107
- Joined: Mon Jul 30, 2007 11:31 pm
- Location: College Park, MD, United States
In Ant.
Yep.
I forgot to mention that I'm performing the transformation using an Ant buildfile. XInclude works fine using Oxygen's built-in Transform feature, but XInclude is not functional when performing the transformation with Ant (which works just fine otherwise).
Using Ant v1.7 (latest from fink).
I discovered the following workaround:
Seems to work for now, but I would like to see if I can get things to work as intended without any workarounds.
I forgot to mention that I'm performing the transformation using an Ant buildfile. XInclude works fine using Oxygen's built-in Transform feature, but XInclude is not functional when performing the transformation with Ant (which works just fine otherwise).
Using Ant v1.7 (latest from fink).
I discovered the following workaround:
Code: Select all
<xsl:template match="xi:include" xmlns:xi="http://www.w3.org/2001/XInclude">
<xsl:apply-templates select="document(@href)/*" />
</xsl:template>
-- Zearin
Return to “General XML Questions”
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