[Zope-xml] Re: XML Transform doc bug ..

Jean Jordaan jean at upfrontsystems.co.za
Wed Sep 4 06:37:09 EDT 2002


Hi Craeg

I'm using FourSuite12Processor now (ignoring the errors mentioned in
http://lists.zope.org/pipermail/zope-xml/2002-September/000239.html )
and I've applied the patch quoted below. It seems to work fine ..

Unfortunately, I don't see any difference in behaviour.
'<xsl:include href="included.xsl" />' does nothing, and inlining
the contents of 'included.xsl' works as intended. Here's a shortened
version of 'included.xsl'

""" included.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   version="1.0">

<xsl:template match="artheader">
<div class="header"> Included!
<xsl:apply-templates select="title" />
<xsl:apply-templates select="subtitle" />
<xsl:apply-templates select="author" />
<xsl:apply-templates select="address" />
</div>
</xsl:template>

[...]

<xsl:template match="address">
<address> <xsl:apply-templates />
</address>
</xsl:template>

</xsl:stylesheet>
"""

Craeg K Strong wrote:
> Jean Jordaan wrote:
>>>>  <xsl:include href="../VERSION"/>
>>>>  <xsl:include href="param.xsl"/>
>>>>  <xsl:include href="../lib/lib.xsl"/>
> 
> I was able to RTFM on 4Suite 12, and here is the patch that
> I believe will make the above usage work!
> 
> retrieving revision 1.13
> diff -u -r1.13 FourSuite12Processor.py
> --- FourSuite12Processor.py    2 Sep 2002 15:39:50 -0000    1.13
> +++ FourSuite12Processor.py    3 Sep 2002 16:46:07 -0000
> @@ -146,7 +146,8 @@
>              docSrc   = ResolvingInputSource(namespaceMap, REQUEST,
>                                              StringIO(xmlContents))
>              styleSrc = ResolvingInputSource(namespaceMap, REQUEST,
> -                                            StringIO(xsltContents))
> +                                            StringIO(xsltContents),
> +                                            systemID)
>              processor.appendStylesheet(styleSrc)
>              result = processor.run(docSrc, topLevelParams = params)

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





More information about the Zope-xml mailing list