On Sun, Jan 14, 2001 at 05:52:58PM +0000, cutlass ([EMAIL PROTECTED]) wrote:
> sungod wrote:
> > <xsl:stylesheet
> >         version="1.0"
> >         xsl:version="1.0"
> >         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > 
> >         <xsl:output method="xml" indent="yes"/>
> > 
> >         <xsl:template match="document('200101111200.xml')/article">
> >                 <xsl:template select="date"/>
> >                 <xsl:template select="title"/>
> >                 <xsl:template select="summary"/>
> >         </xsl:template>
> > </xsl:stylesheet>
> 
> u are trying to 'match' instead of 'select'  ( same error code for 
> earlier versions of sabcmd re: document() )

Well, that IS correct syntax, according to the zvon.org XSLT reference, but you have 
drawn attention to a mistake on my part. The date, title, and summary selections were 
supposed to be <xsl:copy-of> elements rather than <xsl:template> elements. That didn't 
fix the crash and core-dump, though.

> use  <xsl:copy-of select='document("somexmldocument.xml")'/>
> 
> and use this method to create a sourcexml of all your children, then 
> apply another xsl transformation for styling to that 'big; file

I thought about doing this, but there's a drawback here: when I get this technique 
working with my news site, I want to apply it also to a library of e-books I'm making 
from texts I get at Project Gutenberg. These books can be several hundred kilobytes in 
length, and I really don't want to subject my system to the overhead incurred in 
concatenating all of them together just to get title and author information from them.

Instead, I need to use an element that does the same operation as <xsl:copy-of> but 
which also applies the transformation instructions inside that element. I thought 
<xsl:template> would do this, and again, my question is unanswered: is Sablotron 
SUPPOSED to do this, or am I misunderstanding?

I apologize if my asking for XSLT help is off-topic here, but since it is resulting in 
a Sablotron crash, hopefully it can be used to clean up a bug or two.

-- 

"The robber baron's cruelty may sometimes sleep, his cupidity may at some
point be satiated; but those who torment us for our own good will torment us
without end for they do so with the approval of their own conscience."
                                                                -C. S. Lewis
----------------------------------------------------------------------------
[EMAIL PROTECTED]

Reply via email to