cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alten, Jelle Paul (sds-sp)" <jelle.paul.al...@ordina.nl>
Subject RE: Writing plain text files?
Date Tue, 28 Oct 2003 20:56:49 GMT
Nice one, Kieran.

One more last addition in the xsl, start with:

<xsl:output method="text" indent="no" omit-xml-declaration="yes"/>

That's all for now.

Jelle

-----Oorspronkelijk bericht-----
Van: Kieran Kirwan [mailto:KKirwan@dto.ie]
Verzonden: dinsdag 28 oktober 2003 18:36
Aan: users@cocoon.apache.org
Onderwerp: RE: Writing plain text files?


Try these,

----------------------------------------------------------------
[sitemap.xmap]
	<map:match pattern="blahblah">
		<map:generate src="blahblah.xml"/>
		<map:transform type="xslt" src="blahblah.xsl"/>
		<map:serialize type="text"/>
	</map:match>

----------------------------------------------------------------
[blahblah.xml]

<?xml version="1.0"?>
<page>
<line> bla bla bla bla bla bla </line>
<line> murmel murmel murmel </line>
</page>

-----------------------------------------------------------------
[blahblah.xsl]

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

<xsl:template match="/">
<xsl:text>#-----Beginning of text file--------
</xsl:text>
<xsl:for-each select="page/line">   <!-- matches data in nodes.xml -->
<xsl:value-of select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
<xsl:text>#-----End of text file--------
</xsl:text>
</xsl:template>

</xsl:stylesheet>
-----------------------------------------------------------------



_____________________________________________
Kieran Kirwan
Executive Transportation Planner
Transportation Modelling Department
 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message