[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xml->xsl->pdf

Subject: Re: xml->xsl->pdf
From: Peter Flynn <peter@xxxxxxxxxxx>
Date: Thu, 7 Jun 2001 22:49:04 +0100
quark express xml manipulation
On Thu, 07 Jun 2001, Joern wrote:
> So, from
> 
> <TR>
>    <TD>a &amp; b</TD>
>    <TD>c &amp; d</TD>
> </TR>
> 
> I'd like to generate
> 
>  a \& b & c\& d \\
> 
> inside a tabular environment. 

Declare <!ENTITY amp "\&#38;"> and then write

<xsl:template match="TR">
   <xsl:apply-templates/>\\
</xsl:template>

<xsl:template match="TD">
   <xsl:if test="count(preceding-sibling::TD)&gt;0">
      &#38;
   </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
&amp; (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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.