Re: [xep-support] Problem with xinclude?

From: Thomas Christensen <tchristensen@nordija.com>
Date: Tue Nov 25 2008 - 16:36:24 PST

It would seem that the command line version handles xincludes with
empty href differently that the one in XMLEditor.

I'm using xincludes with xpointer references to fetch a tag with a
specified id within the same xml document, so that I can avoid typing
the same text multiple times. This works by setting href="", but only
if I run XEP from within XMLEditor. As I understand the specs, href=""
is allowed if there is an xpointer reference.

<xi:include href="" xmlns:xi="http://www.w3.org/2001/XInclude"
xpointer="element(admin-ccc-tab-title)" />

If I take out these xincludes, the pdf is generated.

Any ideas?

Should I just go for docbook 5.0? Does that remove the pain with using
xincludes with dtds (no validation)?

Thomas

On 26 Nov 2008, at 00:05, Thomas Christensen wrote:

> Hi
>
> I am usin XEP 4.13-20081014 to generate pdf's from an xml file that
> uses xinclude to include other xml files. All following docbook 4.5
> dtd once the xml files are combined. Using XMLEditor and it's XEP
> plugin, I can generate the pdf but using a commandline, I fails with
> the errors below.
>
> [warning] org.xml.sax.SAXParseException: Include operation failed,
> reverting to fallback. Resource error reading file as XML (href='').
> Reason: An xpointer was specified that points to a location in the
> source infoset. This location cannot be accessed due to the
> streaming nature of the processor.
> [error] Error reported by XML parser; SystemID: file:/Users/
> tchristensen/Projects/nordija/fokusondocs/trunk/src/administration-
> console/central-channel-change.xml; Line#: 25; Column#: 49
> [error] javax.xml.transform.TransformerException: Error reported by
> XML parser
> [error] Error reported by XML parser; SystemID: file:/Users/
> tchristensen/Projects/nordija/fokusondocs/trunk/src/administration-
> console/customer-service-tab.xml; Line#: 180; Column#: 51
> [error] javax.xml.transform.TransformerException: Error reported by
> XML parser
> [error] Error reported by XML parser; SystemID: file:/Users/
> tchristensen/Projects/nordija/fokusondocs/trunk/src/administration-
> console/getting-started.xml; Line#: 491; Column#: 87
> [error] javax.xml.transform.TransformerException: Error reported by
> XML parser
> [error] Error reported by XML parser; SystemID: file:/Users/
> tchristensen/Projects/nordija/fokusondocs/trunk/src/administration-
> console/index.xml; Line#: 13; Column#: 40
> [error] javax.xml.transform.TransformerException: Error reported by
> XML parser
> error: formatting failed: javax.xml.transform.TransformerException:
> org.xml.sax.SAXParseException: Error attempting to parse XML file
> (href='getting-started.xml').
>
> This is my ant build set up (actually embedded in maven using maven-
> antrun-plugin):
>
> <property name="endorsed.dirs" value="${xerces.dir}:${xml-
> resolver.dir}:${xep.dir}:${XEPTask.dir}:${saxon.dir}:${xt.dir}"/>
> <property name="xep.config" value="${src}/config/xep.xml"/>
> <property name="xml.catalog.files" value="${target}/lib/docbook-xml-$
> {docbook.xml.version}/catalog.xml;${target}/lib/docbook-xsl-$
> {docbook.xsl.version}/catalog.xml;${src}/config/xmlcatalog/
> svgcatalog.xml"/>
>
> <path id="xep-classpath">
> <pathelement location="${maven.dependency.xep.xep.jar.path}"/>
> <pathelement location="${maven.dependency.xep.xt.jar.path}"/>
> <pathelement location="$
> {maven.dependency.xerces.xercesImpl.jar.path}"/>
> <pathelement location="${maven.dependency.xml-resolver.xml-
> resolver.jar.path}"/>
> <pathelement location="${maven.dependency.xep.saxon.jar.path}"/>
> </path>
>
> <java fork="true" classname="com.renderx.xep.XSLDriver"
> output="${target}/administration-guide.log"
> maxmemory="256m"
> failonerror="true">
> <arg value="-valid"/>
> <arg value="${src}/administration-console/index.xml"/>
> <arg value="-xsl"/>
> <arg value="${target}/lib/docbook-xsl-${docbook.xsl.version}/fo/
> docbook.xsl"/>
> <arg value="-pdf"/>
> <arg value="${target}/docs/administration-console.pdf"/>
> <classpath>
> <path refid="xep-classpath"/>
> </classpath>
> <sysproperty key="com.renderx.xep.CONFIG" value="${xep.config}"/>
> <sysproperty key="java.endorsed.dirs" value="${endorsed.dirs}"/>
>
> <!-- Enable xerceses XInclude and Catalog support -->
> <sysproperty
> key="org.apache.xerces.xni.parser.XMLParserConfiguration"
> value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
> <sysproperty key="com.renderx.sax.entityresolver"
> value="org.apache.xml.resolver.tools.CatalogResolver"/>
> <sysproperty key="com.renderx.jaxp.uriresolver"
> value="org.apache.xml.resolver.tools.CatalogResolver"/>
> <sysproperty key="xml.catalog.files" value="${xml.catalog.files}"/>
> </java>
>
> I'm using xerces 2.9.1, resolver 1.2, docbook xsl 1.74.0 and docbook
> xml 4.5. XT, Saxon and xep libraries are from the xep distribution.
>
> Anyone seen this kind of different behavior before?
>
> Thomas
>

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Tue Nov 25 17:05:01 2008

This archive was generated by hypermail 2.1.8 : Tue Nov 25 2008 - 17:05:02 PST