OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] resolving catalogs on Windows


Mauritz Jeanson wrote:

 >>-----Original Message-----
 >>From: Georges Schmitz
 >
 >> If I simply omit the -r switch (the rest
 >>of the commandline and classpath leaving the same as befor), then the
 >>transformation process is successful. So I'm stuck.

The problem really seems to be the resolving process of admin.xml.

Resolved URI: admin.xml
            file://D:/LHM/Doku/Spec/AdminTool/edit/admin.xml

As I pointed out to Bob Stayton, my current path is
D:/LHM/Doku/Spec/AdminTool/edit/ So its not me that is prefixing
the path with "file://" (2 slashes!), but the resolver. Could the
problem be related to what Bob mentioned in its documentation,
that relative paths don't work with the resolver (even though my
document to be processed isn't listed in the catalog).


 >Could you please give us the full command that starts the 
transformation? A
 >minimal but complete sample document + catalog file would also make it
 >easier for someone trying to reproduce the problem.

Here comes the command (of course all in one line):

D:\LHM\Doku\Spec\AdminTool\edit>java
    
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
    
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
    
-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration
    com.icl.saxon.StyleSheet
    -x org.apache.xml.resolver.tools.ResolvingXMLReader
    -y org.apache.xml.resolver.tools.ResolvingXMLReader
    -r org.apache.xml.resolver.tools.CatalogResolver
    -u
    -o "admin.htm"
    "admin.xml"
    "cdocbook.xsl"
    admon.graphics.path="../../common/images/decorative/"
    use.extensions="1"

("cdocbook.xsl" is resolved by the catalog) If I replace "admin.xml"
by the uri "file:///D:/LHM/Doku/Spec/AdminTool/edit/admin.xml"
(absolute path) then processing is successful. This works also if
I use "file:/" instead of "file:///", but I think that xsltproc
only accepts the notation with 3 slashes (probably the official
form). But "admin.xml" is a valid uri too, or am I wrong here?

 >>>>   Error
 >>>>     Failure reading
 >>
 >>file://D:/LHM/Doku/Spec/AdminTool/edit/admin.xml: D
 >>
 >>>>   Transformation failed: Run-time errors were reported
 >
 >
 >This looks like a malformed URL. There should be three slashes: file:///.

Indeed it is.

The catalog.xml is saved in D:\DocBook where also 
CatalogManager.properties can be found.

Thanks for your help so far,
Georges

<?xml version="1.0"?>
<!DOCTYPE catalog
   PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
   "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd";>

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

  <!-- DTD files installed under d:/DocBook/dtds/ -->
  <group  xml:base="file:///d:/DocBook/dtds/" >

    <!-- Resolve DTD URL system ID to local file -->
    <rewriteSystem
        systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/";
        rewritePrefix="docbkx4.2/" />

    <!-- Resolve DTD PUBLIC identifiers -->
    <nextCatalog  catalog="docbkx4.2/catalog.xml" />

    <!-- To resolve simple DTD SYSTEM identifiers. -->
    <!-- Note: this does not work with Java resolver -->
    <!--   classes in Saxon or Xalan -->
    <system
         systemId="docbook.dtd"
         uri="docbkx4.2/docbookx.dtd" />
  </group>

  <!-- stylesheet files installed under d:/DocBook/style/docbook-xsl-1.67.2/ -->
  <group  xml:base="file:///d:/DocBook/style/docbook-xsl-1.67.2/" >
    <!-- Resolve stylesheet URL to local file -->
    <rewriteURI
        uriStartString="http://docbook.sourceforge.net/release/xsl/current/";
        rewritePrefix="./" />
     To resolve short stylesheet references -->
    <uri
        name="docbook.xsl"
        uri="html/docbook.xsl" />
    <uri
        name="cdocbook.xsl"
        uri="file:///C%3A/Dokumente%20und%20Einstellungen/Schmitz/Anwendungsdaten/WinEdt/Config/XML/submodes/DocBk/styleDrivers/cDocBookHTML.xsl" />

        name="chunk.xsl"
        uri="html/chunk.xsl" />
    <uri
        name="fo-docbook.xsl"
        uri="fo/docbook.xsl" />

  </group>

</catalog>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]