You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xml-commons-dev@xerces.apache.org by "Mark R. Diggory" <md...@latte.harvard.edu> on 2003/09/05 04:41:04 UTC
[resolver] Question about resolving w3c Schemas
I'm looking for a good example of a catalog xml file that resolves w3c
schema's. I'm unsure about how to define such entries, is it similar to
the stylesheet entry which uses the uri element?
thanks,
Mark
Re: [resolver] More descriptive Catalog.properties file
Posted by David Crossley <cr...@indexgeo.com.au>.
David Crossley wrote:
> Mark R. Diggory wrote:
> > Here's hopefully a more detailed example of the properties file ...
<snip/>
> That is a great idea Mark, i will add it to cvs and we can then fine tune.
<snip/>
Thanks, i used your suggestion to start a new page called
"Resolver tips" where we can add various explanations and resources.
It is in CVS (with minor tweaks) at:
src/documentation/content/components/resolver/CatalogManager.properties
--David
Re: [resolver] More descriptive Catalog.properties file
Posted by David Crossley <cr...@indexgeo.com.au>.
Mark R. Diggory wrote:
> Here's hopefully a more detailed example of the properties file with
> comments/examples interspersed. Seems it would be wise to have good
> example of this in the package. I found I had to dig through doc's to
> find it (prior to the generated site, of course!).
:-)
That is a great idea Mark, i will add it in and we can then fine tune.
I did something similar for Apache Cocoon to help me to learn how to
use resolver. It would be interesting to compare our interpretations,
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/webapp/WEB-INF/classes/
...CatalogManager.properties
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/webapp/WEB-INF/entities/
--David
Re: [resolver] Problems parsing catalog.
Posted by David Crossley <cr...@indexgeo.com.au>.
Mark R. Diggory wrote:
> That was the issue, I commented out the dtd entry and it loaded the xml
> properly.
Ah, glad that we found the solution. Cocoon uses a full declaration
with a PublicId and it works beautifully with the CVS resolver.
We need to add that and other changes to the release-notes document.
--David
> -thanks again,
> Mark
>
> David Crossley wrote:
>
> > Mark R. Diggory wrote:
> >
> >>I'm hoping someone might be able to identify why this failure is
> >>occuring when I'm parsing my catalog.xml file, it seems to be trying to
> >>parse it as a text file...
> >>
> >>I've also included the catalog at the bottom of the page. Thanks for any
> >>pointers.
> >
> >
> > I have the same observation. However you are calling it, it seems to
> > try to load it as the older format (TR9401). Both types should work.
> > They do for us.
> >
> > I wonder if it is your document type declaration. Can the parser find
> > that hard-coded DTD? The cvs version of resolver has its own inbuilt
> > knowledge of the "catalog" DTD to avoid a Catch-22.
> >
> > --David
Re: [resolver] Problems parsing catalog.
Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
That was the issue, I commented out the dtd entry and it loaded the xml
properly.
-thanks again,
Mark
David Crossley wrote:
> Mark R. Diggory wrote:
>
>>I'm hoping someone might be able to identify why this failure is
>>occuring when I'm parsing my catalog.xml file, it seems to be trying to
>>parse it as a text file...
>>
>>I've also included the catalog at the bottom of the page. Thanks for any
>>pointers.
>
>
> I have the same observation. However you are calling it, it seems to
> try to load it as the older format (TR9401). Both types should work.
> They do for us.
>
> I wonder if it is your document type declaration. Can the parser find
> that hard-coded DTD? The cvs version of resolver has its own inbuilt
> knowledge of the "catalog" DTD to avoid a Catch-22.
>
> --David
>
>
Re: [resolver] Problems parsing catalog.
Posted by David Crossley <cr...@indexgeo.com.au>.
Mark R. Diggory wrote:
> I'm hoping someone might be able to identify why this failure is
> occuring when I'm parsing my catalog.xml file, it seems to be trying to
> parse it as a text file...
>
> I've also included the catalog at the bottom of the page. Thanks for any
> pointers.
I have the same observation. However you are calling it, it seems to
try to load it as the older format (TR9401). Both types should work.
They do for us.
I wonder if it is your document type declaration. Can the parser find
that hard-coded DTD? The cvs version of resolver has its own inbuilt
knowledge of the "catalog" DTD to avoid a Catch-22.
--David
[resolver] Problems parsing catalog.
Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
I'm hoping someone might be able to identify why this failure is
occuring when I'm parsing my catalog.xml file, it seems to be trying to
parse it as a text file...
I've also included the catalog at the bottom of the page. Thanks for any
pointers.
-Mark
Parse catalog: file:/usr/local/VDC/UIS/VDC/WEB-INF/conf/xml-catalog.xml
Loading catalog: file:/usr/local/VDC/UIS/VDC/WEB-INF/conf/xml-catalog.xml
Default BASE: file:/usr/local/VDC/UIS/VDC/WEB-INF/conf/xml-catalog.xml
Unrecognized token parsing catalog: <?xml
CATALOG: file:/usr/local/VDC/UIS/VDC/WEB-INF/conf/SYSTEM
java.lang.ArrayIndexOutOfBoundsException: 3
at
org.apache.xml.resolver.readers.TextCatalogReader.nextToken(Unknown Source)
at
org.apache.xml.resolver.readers.TR9401CatalogReader.readCatalog(Unknown
Source)
at org.apache.xml.resolver.Catalog.parseCatalogFile(Unknown Source)
at org.apache.xml.resolver.Catalog.parsePendingCatalogs(Unknown
Source)
at org.apache.xml.resolver.Catalog.parseCatalog(Unknown Source)
at org.apache.xml.resolver.Catalog.loadSystemCatalogs(Unknown
Source)
at
org.apache.xml.resolver.tools.CatalogResolver.initializeCatalogs(Unknown
Source)
at org.apache.xml.resolver.tools.CatalogResolver.<init>(Unknown
Source)
at org.apache.jsp.Test_jsp._jspService(Test_jsp.java:189)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at
edu.harvard.hmdc.filter.LayoutFilter.doFilter(LayoutFilter.java:44)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at
edu.harvard.hmdc.filter.TokenFilter.doFilter(TokenFilter.java:53)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at
edu.harvard.hmdc.filter.VDCSessionFilter.doFilter(VDCSessionFilter.java:260)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
<?xml version="1.0"?>
<!DOCTYPE catalog SYSTEM "./catalog.dtd">
<catalog prefer="public">
<group xml:base="http://www.icpsr.umich.edu/DDI/">
<!-- Start System resolved DTD's -->
<system systemId="http://www.icpsr.umich.edu/DDI/Version1.dtd"
uri="Version1.dtd"/>
<system systemId="http://www.icpsr.umich.edu/DDI/Version1-01.dtd"
uri="Version1-01.dtd"/>
<system systemId="http://www.icpsr.umich.edu/DDI/Version1-02.dtd"
uri="Version1-02.dtd"/>
<system systemId="http://www.icpsr.umich.edu/DDI/Version1-02-1.dtd"
uri="Version1-02-1.dtd"/>
<system systemId="http://www.icpsr.umich.edu/DDI/Version1-2-2.dtd"
uri="Version1-2-2.dtd"/>
<system systemId="http://www.icpsr.umich.edu/DDI/Version1-3.dtd"
uri="version1-3.dtd"/>
<system systemId="http://www.icpsr.umich.edu/DDI/version1-3.dtd"
uri="version1-3.dtd"/>
<system systemId="http://www.icpsr.umich.edu/DDI/Version2-0.dtd"
uri="Version2-0.dtd"/>
<!-- End DTD's -->
<!-- Start Public resolved DTD's
<public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
uri="Version1.dtd"/>
<public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN"
uri="Version1-01.dtd"/>
<public publicId="-//OASIS//ENTITIES DocBook XML Character Entities
V4.1.2//EN" uri="Version1-02.dtd"/>
<public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool
V4.1.2//EN" uri="Version1-02-1.dtd"/>
<public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy
V4.1.2//EN" uri="Version1-2-2.dtd"/>
<public publicId="-//OASIS//ENTITIES DocBook XML Additional General
Entities V4.1.2//EN" uri="Version1-3.dtd"/>
<public publicId="-//OASIS//DTD DocBook XML CALS Table Model
V4.1.2//EN" uri="Version2-0.dtd"/>
End DTD's -->
<!-- Start w3c Schemas -->
<uri name="http://www.icpsr.umich.edu/DDI/Version1.xsd"
uri="Version1.xsd"/>
<uri name="http://www.icpsr.umich.edu/DDI/Version1-01.xsd"
uri="Version1-01.xsd"/>
<uri name="http://www.icpsr.umich.edu/DDI/Version1-02.xsd"
uri="Version1-02.xsd"/>
<uri name="http://www.icpsr.umich.edu/DDI/Version1-02-1.xsd"
uri="Version1-02-1.xsd"/>
<uri name="http://www.icpsr.umich.edu/DDI/Version1-2-2.xsd"
uri="Version1-2-2.xsd"/>
<uri name="http://www.icpsr.umich.edu/DDI/Version1-3.xsd"
uri="Version1-3.xsd"/>
<!-- End w3c Schemas -->
</group>
</catalog>
Re: [resolver] More descriptive Catalog.properties file
Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Here's hopefully a more detailed example of the properties file with
comments/examples interspersed. Seems it would be wise to have good
example of this in the package. I found I had to dig through doc's to
find it (prior to the generated site, of course!).
Cheers,
-Mark Diggory
Re: [resolver] Question about resolving w3c Schemas
Posted by David Crossley <cr...@indexgeo.com.au>.
Mark R. Diggory wrote:
> I'm looking for a good example of a catalog xml file that resolves w3c
> schema's. I'm unsure about how to define such entries, is it similar to
> the stylesheet entry which uses the uri element?
I have often pondered this same thing. I found an old message in
the archive that is of some help. ... keen to see other answers.
--David
----------------
http://marc.theaimsgroup.com/?l=xml-commons-dev&m=103834512322147
Subject: I can see the use of catalog resolver with DTD, but what about
schemas?
Date: Tue, 26 Nov 2002
/ edgardo.a.luzcando@verizon.com was heard to say:
| Does the current catalog resolver work with schemas? I really could not
| find much on that.
The resolver provides a hook (URIResolver) that could (should! :-) be
called for all URIs, including those used to obtain schemas. This is
the same hook that is used, for example, to resolve stylesheet URIs in
XSLT (for xsl:include and xsl:import).
Be seeing you,
norm
----------------