[Zope-xml] xsl:include & libxslt (DocBook & XML Transform)

Jean Jordaan jean at upfrontsystems.co.za
Mon Sep 2 08:24:04 EDT 2002


Hi all

Short version: Is it necessary to always specify an include path as an
URN?

Long version:

I have a rudimentary DocBook article being rendered to HTML by a tiny
XSL hack stylesheet I wrote, and it works  :)  However, to get anything
out of the treasures of
   /usr/share/sgml/docbook/xsl-stylesheets-1.52.2/html/docbook.xsl
the XSL needs to get way more complex. The first necessary thing is to
include other stylesheets. I tried (in 'simpleminded_docbook')::

  <xsl:include href="included.xsl" />

I reload 'paper' (XML Transform, source: 'paper.xml', transformer:
'simpleminded_docbook'), but the stylesheet is not applied.
Then I tried::

  <xsl:include href="http://server:15080/xml/registry/included.xsl" />

This takes about 2 minutes to resolve, but does generate a GET for
'include.xsl'::

  192.168.1.5 - jean [02/Sep/2002:14:06:07 +0200] "GET /xml/paper HTTP/1.1" 200 
37204 "" "Mozilla/5.0 (Windows NT 4.0; U) Opera 6.01  [en]"
  192.168.1.2 - Anonymous [02/Sep/2002:14:06:07 +0200] "GET 
/xml/registry/included.xsl HTTP/1.0" 200 0 "" ""

However, the stylesheet is not applied.

In the distro, 'xsl:include' is only mentioned in connection with URNs.
Is it necessary to always specify an include path as an URN? I thought
I'd go with libxml2/libxslt, but "It does not yet do URN resolution"
(from 'LibXsltProcessor.py').

(What I'd *really* love to do would be to just have an "ExternalFile"
pointing at
   /usr/share/sgml/docbook/xsl-stylesheets-1.52.2/html/docbook.xsl
and have everything Just Work!)

-- 
Jean Jordaan
Upfront Systems                         http://www.upfrontsystems.co.za






More information about the Zope-xml mailing list