[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Catalog support in Saxon-B (Linux)?

Subject: Re: Catalog support in Saxon-B (Linux)?
From: Evan Leibovitch <evan@xxxxxxxxx>
Date: Fri, 27 Aug 2010 16:03:42 -0400
Re:  Catalog support in Saxon-B (Linux)?
Please ignore the error.

I redid things precisely as in the instructions and it works.

Now back to the core problem....

- Evan




On 27 August 2010 15:33, Evan Leibovitch <evan@xxxxxxxxx> wrote:
> Thanks for the quick answer.
>
> On 26 August 2010 18:56, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>>
>> You can find information on using Saxon with catalogs here:
>>
>> https://sourceforge.net/apps/mediawiki/saxon/index.php?title=XML_Catalogs
>>
>> Regrettably, if your source document contains a reference to a DTD, there
is no way to prevent the XML parser from attempting to retrieve the DTD. You
can suppress DTD-based validation, but you can't suppress other things that
are DTD-dependent, like entity definitions and default attribute expansion.
>>
>> (There's nothing about this problem that's specific to Java, incidentally,
or for that matter to XSLT. It's a pure XML parsing issue.)
>
> I only thought it was a Java issue since I seem to be able to invoke
> xsltproc without its downloading the DTD.
>
> In any case, I followed the instructions (I think).
>
> I'm now getting a slew of Java errors when I try to invoke it.
>
> ----------
> here is the shell file containing `saxonb`
>
> exec java -cp
/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/saxonb.jar
> \
> B  B  B  B -Dxml.catalog.files=/etc/xml/catalog \
> B  B  B  B -Dxml.catalog.verbosity=1 \
> B  B  B  B net.sf.saxon.Transform \
> B  B  B  B -novw \
> B  B  B  B -r org.apache.xml.resolver.tools.CatalogResolver \
> B  B  B  B -x org.apache.xml.resolver.tools.ResolvingXMLReader \
> B  B  B  B -y org.apache.xml.resolver.tools.ResolvingXMLReader "$@"
> ----------
> Here is the contents of /etc/catalog
>
> <?xml version="1.0"?>
> <!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.0//EN"
> B "file:///usr/share/xml/schema/xml-core/catalog.dtd">
> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
> <delegateURI
uriStartString="http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0
/"
> catalog="file:///etc/xml/rarian-compat.xml"/>
> <delegatePublic publicIdStartString="ISO 8879:1986//ENTITIES"
> catalog="file:///etc/xml/sgml-data.xml"/>
> <delegateSystem systemIdStartString="/usr/share/sgml/dtd/svg"
> catalog="file:///etc/xml/sgml-data.xml"/>
> <delegateSystem systemIdStartString="http://docbook.org/xml/"
> catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook"
> catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegatePublic publicIdStartString="+//IDN faq.org//DTD Frequently
> Asked Questions" catalog="file:///etc/xml/sgml-data.xml"/>
> <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML"
> catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegateSystem
> systemIdStartString="http://www.w3.org/Graphics/SVG/1.1/"
> catalog="file:///etc/xml/sgml-data.xml"/>
> <delegateSystem systemIdStartString="/usr/share/sgml/dtd/qaml-xml.dtd"
> catalog="file:///etc/xml/sgml-data.xml"/>
> <delegatePublic publicIdStartString="-//GlobalTransCorp//DTD XML
> Catalogs V1.0-Based Extension V1.0//EN"
> catalog="file:///etc/xml/xml-core.xml"/>
> <delegatePublic publicIdStartString="-//Norman Walsh//DTD CALS Table
> Model XML" catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegatePublic publicIdStartString="-//OASIS//DTD XML Exchange Table
> Model 19990315" catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegatePublic publicIdStartString="-//Norman Walsh//ELEMENTS DocBk
> XML" catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegatePublic publicIdStartString="-//OASIS//DTD XML Catalogs
> V1.0//EN" catalog="file:///etc/xml/xml-core.xml"/>
> <delegateSystem
>
systemIdStartString="http://globaltranscorp.org/oasis/catalog/xml/tr9401.dtd"
> catalog="file:///etc/xml/xml-core.xml"/>
> <delegatePublic publicIdStartString="-//W3C//DTD SVG"
> catalog="file:///etc/xml/sgml-data.xml"/>
> <delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBook XML"
> catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegateSystem
>
systemIdStartString="http://www.oasis-open.org/committees/entity/release/1.0/
catalog.dtd"
> catalog="file:///etc/xml/xml-core.xml"/>
> <delegateSystem
> systemIdStartString="http://xml.ascc.net/xml/resource/qaml-xml"
> catalog="file:///etc/xml/sgml-data.xml"/>
> <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook"
> catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegateSystem
> systemIdStartString="http://www.w3.org/TR/2001/REC-SVG-20010904/"
> catalog="file:///etc/xml/sgml-data.xml"/>
> <delegatePublic publicIdStartString="-//Norman Walsh//ENTITIES DocBk
> XML" catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegatePublic publicIdStartString="-//Norman Walsh//DTD DocBk XML"
> catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegatePublic publicIdStartString="-//Normal Walsh//Exchange Table
> Model 19960430" catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegatePublic publicIdStartString="+//ISBN 82-7640-023//DTD
> Frequently Asked Questions//EN"
> catalog="file:///etc/xml/sgml-data.xml"/>
> <delegateSystem
> systemIdStartString="http://www.oasis-open.org/docbook/xml/"
> catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table
> Model" catalog="file:///etc/xml/docbook-xml.xml"/>
> <delegateSystem
> systemIdStartString="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
> catalog="file:///etc/xml/xhtml1-strict.dtd"/>
> <delegatePublic publicIdStartString="-//W3C//DTD XHTML 1.0 Strict//EN"
> catalog="file:///etc/xml/xhtml1-strict.dtd"/>
> </catalog>
>
> ----------
> Here is the invokation of the command and the error messages:
>
> $ saxonb -ext:on -o foo.out -s foo.html -xsl:foo.xsl
> java.lang.ArrayIndexOutOfBoundsException: 3
> B  B  B  B at
org.apache.xml.resolver.readers.TextCatalogReader.nextToken(TextCatalogReader
.java:249)
> B  B  B  B at
org.apache.xml.resolver.readers.TR9401CatalogReader.readCatalog(TR9401Catalog
Reader.java:81)
> B  B  B  B at
org.apache.xml.resolver.Catalog.parseCatalogFile(Catalog.java:861)
> B  B  B  B at
org.apache.xml.resolver.Catalog.parsePendingCatalogs(Catalog.java:757)
> B  B  B  B at
org.apache.xml.resolver.Catalog.parseCatalog(Catalog.java:605)
> B  B  B  B at
org.apache.xml.resolver.Catalog.resolveLocalSystem(Catalog.java:1829)
> B  B  B  B at
org.apache.xml.resolver.Catalog.resolveSystem(Catalog.java:1704)
> B  B  B  B at
org.apache.xml.resolver.tools.CatalogResolver.getResolvedEntity(CatalogResolv
er.java:131)
> B  B  B  B at
org.apache.xml.resolver.tools.ResolvingXMLFilter.resolveEntity(ResolvingXMLFi
lter.java:173)
> B  B  B  B at
com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.resolveEntity(E
ntityResolverWrapper.java:110)
> B  B  B  B at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntityAsPerSt
ax(XMLEntityManager.java:995)
> B  B  B  B at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.disp
atch(XMLDocumentScannerImpl.java:1167)
> B  B  B  B at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next
(XMLDocumentScannerImpl.java:1065)
> B  B  B  B at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.n
ext(XMLDocumentScannerImpl.java:978)
> B  B  B  B at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocume
ntScannerImpl.java:625)
> B  B  B  B at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDo
cumentScannerImpl.java:116)
> B  B  B  B at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDo
cument(XMLDocumentFragmentScannerImpl.java:488)
> B  B  B  B at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Conf
iguration.java:812)
> B  B  B  B at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Conf
iguration.java:741)
> B  B  B  B at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123
)
> B  B  B  B at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSA
XParser.java:1208)
> B  B  B  B at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAX
ParserImpl.java:525)
> B  B  B  B at
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
> B  B  B  B at
org.apache.xml.resolver.tools.ResolvingXMLFilter.parse(ResolvingXMLFilter.jav
a:141)
> B  B  B  B at net.sf.saxon.event.Sender.sendSAXSource(Unknown Source)
> B  B  B  B at net.sf.saxon.event.Sender.send(Unknown Source)
> B  B  B  B at net.sf.saxon.event.Sender.send(Unknown Source)
> B  B  B  B at net.sf.saxon.Controller.transform(Unknown Source)
> B  B  B  B at net.sf.saxon.Transform.processFile(Unknown Source)
> B  B  B  B at net.sf.saxon.Transform.doTransform(Unknown Source)
> B  B  B  B at net.sf.saxon.Transform.main(Unknown Source)
> Fatal error during transformation: java.lang.ArrayIndexOutOfBoundsException:
3
>
> The same file, run through xsltproc, generates no errors.
>
> Any suggestions?
>
> - Evan
>



--
- Evan

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.