Page 1 of 1

xi:includes and xslt

Posted: Mon Sep 15, 2014 1:22 pm
by emmam
Hi all,

I'd to manage metadata info with xi:includes.
so I included some info about the project like that, in my template file :
(...)
<publicationStmt>
(...)
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="http://src/ox-addon/authority.xml">
<xi:fallback>
<p>The authority statement should appear in this space.</p>
</xi:fallback>
</xi:include>
<idno/>
</publicationStmt>


authority.xml contains :

<?xml version="1.0" encoding="UTF-8"?>
<authority xmlns="http://www.tei-c.org/ns/1.0"> Organization</authority>

when I process my xslt, on the including xml file, the content of the include authority element is not processed.
what am I missing ?

emma

Re: xi:includes and xslt

Posted: Tue Feb 10, 2015 9:10 am
by Patrik
Hi Emma,

it is a configuration wheather the xslt engine should resolve the xi:include or not. So if the xi:include is not resolved at all (find out with <xsl:message select="."/> in your main-template) you should check this. In the oxygen settings there's an entry XML / XML-Parser / XInclude options. (Not sure though, if this applys to all xslt engines.)

Patrik

Re: xi:includes and xslt

Posted: Tue Feb 10, 2015 11:16 am
by adrian
Hi,

Just to clarify, the option "Enable XInclude processing" from (Preferences, XML > XML-Parser, XInclude options) operates at XML parser level. This means that XInclude processing happens before the XSLT engine comes into play. As a result this option applies to all Java-based builtin XSLT engines from Oxygen: Xalan, Saxon 6.5.5 and Saxon-HE/PE/EE 9.x.

Regards,
Adrian