Mega Code Archive

 
Categories / XML / XSLT StyleSheet
 

Add your signs to the output (output method=text)

File: Data.xml <chapter>   <title>The Chapter</title>   <sect1>     <title>First Section</title>     <figure>       <title>First picture in book</title>       <graphic fileref="pic1.jpg" />     </figure>   </sect1> </chapter> File: Transform.xslt <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"   version="1.0">   <xsl:output method="text" />   <xsl:template match="sect1/title">     [     <xsl:apply-templates />     ]   </xsl:template>   <xsl:template match="para" /> </xsl:stylesheet> Output:   The Chapter             [     First Section     ]               First picture in book