[xslt] Problem with xsltproc on Windows



Hi!  I've been trying to do some Docbook processing with xsltproc on
Windows, and I am having some difficulties.  I'm not sure if this is a
libxml issue, libxslt issue, or both so I have emailed both lists:

Using the Windows binaries for libxml, libxslt and xsltproc.exe from
http://www.zlatkovic.com/libxml.en.html I get the following results
when trying to use xsltproc with a catalog file (I'm using a CMake
script to set the environment variables and actually launch the
command).  This setup works (obviously with different paths) on all
non-Windows systems I've tried it on - is there something special I
need to do for catalog files on Windows?

Any help appreciated - thanks!  (Let me know if anything besides what
is below is needed or would be helpful.)

CY

CMake Invocation script:
SET(ENV{XML_CATALOG_FILES}
"C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml")
SET(ENV{XML_DEBUG_CATALOG} 1)
execute_process(COMMAND "C:/Program Files (x86)/xsltproc/xsltproc.exe"
-nonet -xinclude -o
C:/docs/brlcad-build/share/brlcad/7.21.0/html/mann/en/3ptarb.html
C:/docs/brlcad/doc/docbook/resources/brlcad/brlcad-xhtml-stylesheet.xsl
C:/docs/brlcad/doc/docbook/system/mann/en/3ptarb.xml)

Here is the output:

cmake.exe -P 3ptarb_mann_html.cmake
Resolve: sysID C:///xsl/xhtml-1_1/docbook.xsl
1692 Parsing catalog C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml
C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml:
0: element system: Catalog error : system entry 'uri' broken ?:
file://C:/docs/brlcad/doc/docbook/resources/other/standard/svg/svg11-tiny-flat.dtd
C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml:
0: element rewriteSystem: Catalog error : rewriteSystem entry
'rewritePrefix' broken ?:
file://C:/docs/brlcad/doc/docbook/resources/other/standard/svg/
C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml:
0: element rewriteURI: Catalog error : rewriteURI entry
'rewritePrefix' broken ?:
file://C:/docs/brlcad/doc/docbook/resources/other/standard/svg/
C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml:
0: element rewriteURI: Catalog error : rewriteURI entry
'rewritePrefix' broken ?:
file://C:/docs/brlcad/doc/docbook/resources/other/standard/xsl/
C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml:
0: element rewriteURI: Catalog error : rewriteURI entry
'rewritePrefix' broken ?:
file://C:/docs/brlcad/doc/docbook/resources/brlcad/
C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml:
0: element rewriteURI: Catalog error : rewriteURI entry
'rewritePrefix' broken ?: file://C:/docs/brlcad/doc/docbook/
C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml
added to file hash
Resolve URI C:///xsl/xhtml-1_1/docbook.xsl
Found C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml in file hash
Resolve: sysID C:///xsl/xhtml-1_1/docbook.xsl
Found C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml in file hash
Resolve URI C:///xsl/xhtml-1_1/docbook.xsl
Found C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml in file hash
warning: failed to load external entity "C:///xsl/xhtml-1_1/docbook.xsl"
compilation error: file
C:/docs/brlcad/doc/docbook/resources/brlcad/brlcad-xhtml-stylesheet.xsl
line 10 element import
xsl:import : unable to load C:///xsl/xhtml-1_1/docbook.xsl
Resolve: sysID C:///brlcad/brlcad-common.xsl
Found C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml in file hash
Resolve URI C:///brlcad/brlcad-common.xsl
Found C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml in file hash
Resolve: sysID C:///brlcad/brlcad-common.xsl
Found C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml in file hash
Resolve URI C:///brlcad/brlcad-common.xsl
Found C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml in file hash
warning: failed to load external entity "C:///brlcad/brlcad-common.xsl"
compilation error: file
C:/docs/brlcad/doc/docbook/resources/brlcad/brlcad-xhtml-stylesheet.xsl
line 13 element import
xsl:import : unable to load C:///brlcad/brlcad-common.xsl
Catalogs cleanup
Free catalog entry C:/docs/brlcad-build/doc/docbook/brlcad-xml-catalog.xml
Free catalog entry


The catalog file contents are:

<?xml version='1.0' encoding='ASCII'?>

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

  <!-- use local versions of some DTDs -->
  <system
      systemId='http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'
      uri='file://C:/docs/brlcad/doc/docbook/resources/other/standard/svg/svg11-tiny-flat.dtd'
  />

  <rewriteSystem
      systemIdStartString='http://www.w3.org/Graphics/SVG/1.1/DTD/'
      rewritePrefix='file://C:/docs/brlcad/doc/docbook/resources/other/standard/svg/'
  />

  <rewriteURI
      uriStartString='http://www.w3.org/Graphics/SVG/1.1/DTD/'
      rewritePrefix='file://C:/docs/brlcad/doc/docbook/resources/other/standard/svg/'
  />

  <rewriteURI
      uriStartString='/xsl/'
      rewritePrefix='file://C:/docs/brlcad/doc/docbook/resources/other/standard/xsl/'
  />

  <rewriteURI
      uriStartString='/brlcad/'
      rewritePrefix='file://C:/docs/brlcad/doc/docbook/resources/brlcad/'
  />

  <rewriteURI
      uriStartString='/doc/'
      rewritePrefix='file://C:/docs/brlcad/doc/docbook/'
  />


</catalog

The xsl stylesheet contents are:

<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:d="http://docbook.org/ns/docbook";
  exclude-result-prefixes="d"
  version='1.0'
>

  <!-- the base stylesheet (resolved by this name
       in the xml catalog file) -->
  <xsl:import href="/xsl/xhtml-1_1/docbook.xsl"/>

  <!-- common param inputs, etc. -->
  <xsl:import href="/brlcad/brlcad-common.xsl"/>

  <!-- the BRL-CAD css base for all html -->
  <xsl:param name="html.stylesheet">../../css/brlcad.css</xsl:param>

<!-- ==================================================================== -->

  <!-- other customizations -->
  <!-- line breaks, DB p. 245 -->
  <xsl:template match="processing-instruction('linebreak')">
    <br />
  </xsl:template>

  <xsl:param name="default.image.width">5in</xsl:param>
  <xsl:param name="chunker.output.indent">yes</xsl:param>

  <!-- html header/footer -->
  <xsl:param name="navig.showtitles">1</xsl:param>
  <!-- from Bob Stayton's book: -->
  <xsl:param name="local.l10n.xml" select="document('')" />
  <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";>
    <l:l10n language="en">
      <l:gentext key="nav-home" text="Table of Contents"/>
    </l:l10n>
  </l:i18n>


<!-- ==================================================================== -->
<!-- this is a modified header nav template from html/chunk-common.xsl
version 1.76.1 -->

<!--
<xsl:import href="brlcad-xhtml-header-navigation.xsl"/>
-->

</xsl:stylesheet>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]