Referencing modules multiple times in a project
-
- Posts: 13
- Joined: Mon Jul 29, 2013 6:14 pm
Referencing modules multiple times in a project
Hi,
I'd like to use the same module multiple times in my project, for example, a safety note, a standard phrase, etc.
I can import a module from my module base with an include element.
So far, so good... Unfortunately the module is imported with its ID, but using the same ID in the project throws validation errors. It works anyway, but it would be nice to get rid of these validation errors.
Is it possible to remove the id attribute of all included elements? That would be the most elegant way, I think, because the ID is useless anyway (because it is not unique).
Thanks a lot!
cube
I'd like to use the same module multiple times in my project, for example, a safety note, a standard phrase, etc.
I can import a module from my module base with an include element.
Code: Select all
<xi:include href="mymodulebase.xml" xpointer="mymodule"/>
Is it possible to remove the id attribute of all included elements? That would be the most elegant way, I think, because the ID is useless anyway (because it is not unique).
Thanks a lot!
cube
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Referencing modules multiple times in a project
Hi,
This is the limitation that the xi:include 1.0 standard has unfortunately, all IDs from the referenced document are preserved in the master document. The xi:include 1.1 standard tries to address this:
http://www.w3.org/TR/2012/WD-xinclude-1 ... te-copying
but there is no implementation of the xi:include 1.1 standard yet available.
The only alternative would probably be to avoid having IDs at all in that reused XML content and to use an xpointer value like xpointer="element(/1/2) which means the second child of the root element, basically to use the element scheme with the xpointer instead of referencing via ID:
http://www.w3.org/TR/2003/REC-xptr-element-20030325/
Regards,
Radu
This is the limitation that the xi:include 1.0 standard has unfortunately, all IDs from the referenced document are preserved in the master document. The xi:include 1.1 standard tries to address this:
http://www.w3.org/TR/2012/WD-xinclude-1 ... te-copying
but there is no implementation of the xi:include 1.1 standard yet available.
The only alternative would probably be to avoid having IDs at all in that reused XML content and to use an xpointer value like xpointer="element(/1/2) which means the second child of the root element, basically to use the element scheme with the xpointer instead of referencing via ID:
http://www.w3.org/TR/2003/REC-xptr-element-20030325/
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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