[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xml->xsl->pdf
On Thu, 07 Jun 2001, Joern wrote: > So, from > > <TR> > <TD>a & b</TD> > <TD>c & d</TD> > </TR> > > I'd like to generate > > a \& b & c\& d \\ > > inside a tabular environment. Declare <!ENTITY amp "\&"> and then write <xsl:template match="TR"> <xsl:apply-templates/>\\ </xsl:template> <xsl:template match="TD"> <xsl:if test="count(preceding-sibling::TD)>0"> & </xsl:if> <xsl:apply-templates/> </xsl:template> But you'll have to do it with a validating parser, because I don't think a non-validating one will honour a [re]definition of & (because it's pre-declared for DTDless operations, and only the first declaration of entities gets honoured). > String replacement is a way to go, and > with appropriate mappings in a repository like XSLTSL for example a good > one. I just thought that an output method would make things a little bit > easier. It certainly would, pace Sebastian's comments about TeX systems which process XML direct...I like being able to use the tree manipulation abilities of XSLT in order to generate my LaTeX, but I do think what Sebastian and David have done getting TeX to read XML and XSL may be more viable in the long term. ///Peter XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|