Xinclude elements from the same document
Oxygen general issues.
-
- Posts: 190
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Xinclude elements from the same document
Post by martindholmes »
I'm trying to get around the huge amount of duplication that typically happens in TEI documents, where titles, authors and similar info tend to appear in two or three different places. I'm doing this by using XInclude to include data from one part of the document in another part of the same document, like this:
...
<title type="main"><xi:include href="" xpointer="element(mainTitle)/*"><xi:fallback>[Main title is missing]</xi:fallback></xi:include></title>
...
<title level="a" type="main" xml:id="mainTitle">Towards Higher Ground</title>
Here, the contents of the second title element, which has the xml:id "mainTitle", should (I think) be xincluded into the first title element. I'm not 100% sure I have the xpointer syntax right, but my main problem right now is that oXygen doesn't seem to be able to process any XInclude statement which refers to another location in the same document; this is the error I get when I try to validate the document against an RNG schema:
Include operation failed, reverting to fallback. Resource error reading file as XML (href=''). Reason: An xpointer was specified that points to a location in the source infoset. This location cannot be accessed due to the streaming nature of the processor.
Is there any way I can get oXygen to validate a document like this?
Cheers,
Martin
...
<title type="main"><xi:include href="" xpointer="element(mainTitle)/*"><xi:fallback>[Main title is missing]</xi:fallback></xi:include></title>
...
<title level="a" type="main" xml:id="mainTitle">Towards Higher Ground</title>
Here, the contents of the second title element, which has the xml:id "mainTitle", should (I think) be xincluded into the first title element. I'm not 100% sure I have the xpointer syntax right, but my main problem right now is that oXygen doesn't seem to be able to process any XInclude statement which refers to another location in the same document; this is the error I get when I try to validate the document against an RNG schema:
Include operation failed, reverting to fallback. Resource error reading file as XML (href=''). Reason: An xpointer was specified that points to a location in the source infoset. This location cannot be accessed due to the streaming nature of the processor.
Is there any way I can get oXygen to validate a document like this?
Cheers,
Martin
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
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