-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Dermot,
You do need to point to xercesImpl but you need to do that in the
build.properties file:
# Modify the follosing so that they point to your local
# copy of the jars indicated:
# * Saxon 6.5 jar
# * Xerces 2: xercesImpl.jar
# * xml-commons: xml-apis.jar
xslt-processor-classpath=/usr/share/java/saxon-6.5.5.jar
xercesImpl.jar=/usr/share/java/xercesImpl.jar
xml-apis.jar=/usr/share/java/xml-apis.jar
The xincludes are then resolved at the profiling stage:
...
<xslt
in="${input-xml}"
out="${xincluded-profiled.xml}"
style="../profiling/profile.xsl">
<sysproperty
key="org.apache.xerces.xni.parser.XMLParserConfiguratio
value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
...
Note that <sysproperty> is an ant 1.8.x feature, so be sure you're
using the correct version of ant.
It's important that the xincludes be resolved during the profiling
pass since you want the xincluded content to be profiled (not just the
content in the "root" file).
Hope that helps.
David
On 05/30/2012 11:22 AM, Dermot O'Halloran wrote:
>
> Hi,
>
> The xinclude contained in the Webhelp sample does not work unless
> you include Xerces in the Ant xslt task. The xinlcude is ignored
> with a "Element include in namespace
> 'http://www.w3.org/2001/XInclude' encountered in book, but no
> template matches." message:
>
> chunk: [mkdir] Created dir: C:\Program Files
> (x86)\docbook-xsl-1.77.0\webhelp\docs [xslt] Processing C:\Program
> Files (x86)\docbook-xsl-1.77.0\webhelp\docsrc\readme.xml to
> C:\Program Files
> (x86)\docbook-xsl-1.77.0\webhelp\docs\null172184698 [xslt] Loading
> stylesheet C:\Program Files
> (x86)\docbook-xsl-1.77.0\profiling\profile.xsl [xslt] Processing
> C:\Program Files
> (x86)\docbook-xsl-1.77.0\webhelp\docs\null172184698 to C:\Program
> Files (x86)\docbook-xsl-1.77.0\webhelp\docs\null734982840 [xslt]
> Loading stylesheet C:\Program Files
> (x86)\docbook-xsl-1.77.0\webhelp\xsl\webhelp.xsl [xslt] language:
> en [xslt] Writing docs/content/ch01.html for chapter [xslt] Writing
> docs/content/ch02s01.html for section [xslt] Writing
> docs/content/ch02s02.html for section [xslt] Writing
> docs/content/ch02s03.html for section [xslt] Writing
> docs/content/ch02s04.html for section [xslt] Writing
> docs/content/ch02s05.html for section [xslt] Writing
> docs/content/ch02.html for chapter [xslt] Writing
> docs/content/ch03s01.html for section [xslt] Writing
> docs/content/ch03s02.html for section [xslt] Writing
> docs/content/ch03.html for chapter [xslt] Writing
> docs/content/ch04.html for chapter [xslt] Element include in
> namespace 'http://www.w3.org/2001/XInclude' encountered in book,
> but no template matches. [xslt] Writing docs/content/index.html for
> book [xslt] Writing docs/index.html [xslt] Writing
> docs/content/search/l10n.js [copy] Copying 92 files to C:\Program
> Files (x86)\docbook-xsl-1.77.0\webhelp\docs [copy] Copying 1 file
> to C:\Program Files (x86)\docbook-xsl-1.77.0\webhelp\docs\content
>
> Including the Xerces JAR in the xslt call as follows gets it
> working:
>
> <xslt in="${input-xml}" out="${xincluded-profiled.xml}"
> style="../profiling/profile.xsl" classpath="${xercesImpl.jar}">
>
> I'm not sure why the Xerces JAR needs to be declared explicitly in
> this case as the xinclude works if the sample is built using
> xsltproc from the command line (in Ubuntu). I'm using Java
> 1.6.0_31.
>
> Rgds, Dermot
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPyEinAAoJEMHeSXG7afUhlwgH/0UxKSABDydIw+Bz3s9uTCyW
61sSkzdg+kAx34Kh6/6An49Orc3tPCfwmOxSZvsWRF1fWUlaiHTPKd1Vpo7O38q+
6vyVPpK1atYJCBVOZA6d7gdZ02lV8l1uTsOiceh0akytgSBmVG8gSGekqNbLles9
/MhC4qCp2jS4Su9eg3+xBcLqpFph/VVcRJI3jl9IYDo8UWDDx4YDnfPFJ+Uz4yLH
iy/q/yWU0DXEKqbnZ9m7vR0TBfxuEXOBtHfHisymsLXBZ59f845u8SD3VkY3xpCl
affChtku8v99HwlGkosgsCKlg+eywo3v6s8X6a3dUfCNB2+qCcbJZ/QqIGuIs00=
=EPyg
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]