resolve xinclude through catalog
Oxygen general issues.
-
- Posts: 34
- Joined: Thu Nov 12, 2020 12:24 pm
resolve xinclude through catalog
Hi,
my team has a large project with files in many subfolders. We'd like to use XInclude for including common stuff from a file called Vokabular.xml which lives in the project root.
Including with relative works fine when creating new files via templates. The following complex XPath expression gets expanded to a correct relative path in the project folder structure:
But this technique is not robust against moving the files to an other folder level. That's why we'd prefer resolving the included stuff through a catalog file.
Here is the catalog entry (from ${pdu}/resources/catalog.xml):
But the include fails. I set the logging to verbose and the related
message are:
What's going wrong here?
Kind regards,
Christian
my team has a large project with files in many subfolders. We'd like to use XInclude for including common stuff from a file called Vokabular.xml which lives in the project root.
Including with relative works fine when creating new files via templates. The following complex XPath expression gets expanded to a correct relative path in the project folder structure:
Code: Select all
<xi:include href="${xpath_eval(concat( string-join((tokenize(replace(substring-after('${cfdu}', '${pdu}'), '^/', ''), '/') ! '../'), ''), 'Vokabular.xml') )}" xpointer="encodingDesc"/>
Code: Select all
<xi:include href="http://wwu.de/ArabistikIslam/ALEA/Vokabular.xml" xpointer="encodingDesc"/>
Code: Select all
<uriSuffix uriSuffix="ALEA/Vokabular.xml" uri="../Vokabular.xml"/>
message are:
Code: Select all
Description: Could not resolve PublicID: [null] SystemID: [http://wwu.de/ArabistikIslam/ALEA/Vokabular.xml]
Description: Resolved URI: [http://wwu.de/ArabistikIslam/ALEA/Vokabular.xml] [file:/home/clueck/Projekte/edition-ibn-nubatah/Vokabular.xml]
Description: Could not resolve PublicID: [null] SystemID: [http://wwu.de/ArabistikIslam/ALEA/Vokabular.xml]
Kind regards,
Christian
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: resolve xinclude through catalog
Hi Christian,
In the same XML catalog file can you also add a system suffix mapping like:
?
Also these relative paths that you specify in the XML catalog like ../Vokabular.xml are interpreted relative to the location of the XML catalog file.
Regards,
Radu
In the same XML catalog file can you also add a system suffix mapping like:
Code: Select all
<systemSuffix systemIdSuffix="ALEA/Vokabular.xml" uri="../Vokabular.xml"/>
Also these relative paths that you specify in the XML catalog like ../Vokabular.xml are interpreted relative to the location of the XML catalog file.
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