xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skripi-li...@myrealbox.com
Subject Re: xerces-2.3.0: error in the schema resolving ?
Date Tue, 08 Apr 2003 21:50:04 GMT
last mail seems to be lost...
Neeraj Bajaj:
> >I'm using the xerces parser inside xalan or saxon.
> >
> >I want to use xml catalogs, to access DTD offline with their URL.
> >
> >It seems, that xerces is issueing an internet connection, even if all files
> >are available locally.
> > 
> >
> You need to set an EntityResolver that point to all the files available 
> locally.
Which entity resolver I have three posibilities (yes I'm a newbie...):
- com.sun.resolver.tools.ResolvingXMLReader
- com.sun.resolver.tools.CatalogResolver
- com.sun.resolver.Resolver


I found out, that if i disable the DOCTYPE declaration in /etc/xml/catalog,
the first appearing excpetion disappears. 
   (Shouldn't xerces know about the xml-catalog DTD ? Why does it try to look it up ?)
   the DTD is: 
    <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" 
                         "http://www.oasis-open.org/committees/entity/release/2.0/catalog.dtd">


Now xml catalog validation runs fine until it finally has to look up some DTD
and system identifier:

------------------------------
[java] resolveSystem(http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd)
[java] Switching to delegated catalog(s):
[java]     file:/usr/share/sgml/docbook/xmlcatalog
[java] Parse catalog: file:/usr/share/sgml/docbook/xmlcatalog
[java] Loading catalog: file:/usr/share/sgml/docbook/xmlcatalog
[java] Default BASE: file:/usr/share/sgml/docbook/xmlcatalog
[java] I/O exception trying to resolve: -//OASIS//DTD DocBook XML V4.2//EN
[java] resolvePublic(-//OASIS//DTD DocBook XML V4.2//EN,http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd)
[java] Switching to delegated catalog(s):
[java]     file:/usr/share/sgml/docbook/xmlcatalog
[java] Parse catalog: file:/usr/share/sgml/docbook/xmlcatalog
[java] Loading catalog: file:/usr/share/sgml/docbook/xmlcatalog
[java] Default BASE: file:/usr/share/sgml/docbook/xmlcatalog
[java] Error 
[java] I/O exception trying to resolve: -//OASIS//DTD DocBook XML V4.2//EN
[java]   Failure reading file:/home/jens/projects/docbook/dark-sun/book.xml: www.oasis-open.org
[java] Transformation failed: Run-time errors were reported
------------------------------

The debug messages do not tell me which file it wants to download.
As below xmlcatalog shows below it seems, that all neccassary files
are avaible.


So I still belief this to be an xerces error. Because it fails for both SAXON
and XALAN. The program 'xmlcatalog' from xmlsoft.org (?) can successfully
verify that the requested DTD is on the filesystem:
----------
bash> xmlcatalog /etc/xml/catalog "-//OASIS//DTD DocBook XML V4.2//EN" \
      "http://www.oasis-open.oren.org/g/docbook/xml/4.2/docbookx.dtd"
file:///usr/share/sgml/docbook/xml-dtd-4.2-1.0-14/docbookx.dtd
file:///usr/share/sgml/docbook/xml-dtd-4.2-1.0-14/docbookx.dtd
----------

Is there a debugging command for xerces ?
Or does this still belong to the resolver class ?



setup for reference:


I use the following ant properties:
----------------- ant --------------------
   <property name="SAXON"            value="com.icl.saxon.StyleSheet" />
   <property name="XALAN"            value="org.apache.xalan.xslt.Process" />
   <property name="RESOLVER-READER"  value="com.sun.resolver.tools.ResolvingXMLReader"
/>
   <property name="RESOLVER-CATALOG" value="com.sun.resolver.tools.CatalogResolver" />
      <java classname="${SAXON}" failonerror="true" fork="yes">
         <arg line="-x ${RESOLVER-READER}"/>
         <arg line="-y ${RESOLVER-READER}"/>
         <arg line="-r ${RESOLVER-CATALOG}"/>
         <arg line="-u"/>
         <arg line="-o .index.html ${file-in}  ${xsl-chunk}"/>
         <arg line="base.dir='${dir-out}/'"/>
         <classpath refid="all"/>
      </java>
      <java classname="${XALAN}" failonerror="true" fork="yes">
         <arg line="-ENTITYRESOLVER ${RESOLVER-CATALOG}"/>
         <arg line="-URIRESOLVER    ${RESOLVER-CATALOG}"/>
         <arg line="-in ${file-in} -xsl ${xsl-chunk} -out .index.html"/>
         <arg line="-param base.dir '${dir-out}'"/>
         <classpath refid="all"/>
      </java>
----------------- ant --------------------


and I have a Catalog Manager Property:
----------------- CatalogManager.properties --------------------
#CatalogManager.properties
          
verbosity=100
          
relative-catalogs=yes
          
# Always use semicolons in this list
catalogs=/etc/xml/catalog;/usr/share/sgml/docbook/xmlcatalog;

prefer=public

static-catalog=yes
          
allow-oasis-xml-catalog-pi=yes
       
catalog-class-name=com.sun.resolver.Resolver

#catalog-class-name=org.apache.xml.resolver.Resolver
----------------- CatalogManager.properties --------------------
 

Coao

Jens Skripczynski
-- 
E-Mail: skripczynski(at)mail2003(dot)skripczynski(dot)de

True ignorance is not the absence of knowledge, but the refusal to acquire it.
                                   -- Karl Popper


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Mime
View raw message