xi:includes and xslt

Oxygen general issues.
emmam
Posts: 16
Joined: Sat Jul 28, 2012 11:41 am

xi:includes and xslt

Post 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
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: xi:includes and xslt

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: xi:includes and xslt

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply