Re: [xslt] exslt:document and xsltproc



Sebastian Rahtz wrote:
> david reid wrote:
>>   <xsl:for-each select="item">
>>     <xsl:variable name="uri" select="concat('dir/', name, '.xml')"/>
>>     <exsl:document method="xml" version="1.0" encoding="utf-8"
>> href="{$uri}">
>>       <xsl:apply-templates select="."/>
>>     </exsl:document>
>>   </xsl:for-each>
>>
>> What I really want is some way of writing out each exsl:document as a
>> seperate file using a filename based on $uri. Is such a thing possible?
>>   
> You're not saying what error you get when you
> run the above. I do something similar
> regularly, for years now, and it just works
> as expected.
> 
> <name> is a child of <item> in your XML?

Yes.

I don't get an error. I just get a stream of exsl:document's on stdout.
When I use xsltproc -o 'foo.xml' I get the entire stream saved as
'foo.xml' with the exsl:document sections inline. What I'm looking for
is some way to have them saved as external documents.

I think my xsltproc is reasonably up to date?

david x40:~/svn/projects $ xsltproc --version
Using libxml 20624, libxslt 10115 and libexslt 812
xsltproc was compiled against libxml 20622, libxslt 10115 and libexslt 812
libxslt 10115 was compiled against libxml 20622
libexslt 812 was compiled against libxml 20622

Sorry if I'm missing something obvious :-(

-- 
david

Have you listened to FeatherCast yet?
http://feathercast.org/

Bought the t-shirt?
http://www.cafepress.com/feathercast/


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