Greetings, all... new subscriber here...

I'm trying to use XSLT to create indexes from several XML files in a directory. The 
approach I've taken can be derived from the following stylesheet:

<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>

...with one <xsl:template match="document()"> statement for each of the articles I 
want to put in the index file. When I feed the stylesheet into Sablotron (I'm using v. 
0.50 from the commandline on a hacked-up Red Hat 7 system), I tell it to use 
200101111200.xml as a source document (but, imo, it shouldn't matter since no part of 
the source tree is referenced directly; all templates refer to a child of a document() 
function).

While the document() function appears to work when I use it in this context: 
<xsl:copy-of select="document('200101111200.xml')/article"/>, it does not work as 
listed above. Sablotron crashes and dumps core, with the following error message:

[sungod@potok news]$ sabcmd index.xsl 200101111200.xml index.xml
sabcmd: expr.cpp:1626: Bool Expression::patternOK (): Assertion `functor == EXFO_UNION 
|| functor == EXF_LOCPATH' failed.
Aborted (core dumped)

Now, I'm a newbie to XSL, so while such a crash is a bug on Sablotron's part, I don't 
know if maybe there is a better way to approach my goal. I've considered using XLink 
to include several XPath-denoted tree fragments in my index file, but I don't know of 
any processors that will recognize the XLink namespace and do the embedding 
accordingly.

I'd appreciate any input to let me know what I'm doing wrong, what a better approach 
would be, or whether the error is wholly Sablotron's (and I can provide core files if 
anybody wants). Thanks much, in advance.
-- 

"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