|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Catch ALL | Failed template rule
Hi, FO is PDF documents in raw form. If you want to use XML to produce PDF you have to write the XSL to output FO, which is then processed into PDF. Nicola :) Nicola Harlow Technical Author The Program Management Group plc tel: +44 (0) 1937 547 171 direct: +44 (0) 1937 547 165 fax: +44 (0) 1937 547 154 mail: nicola.harlow@xxxxxxxxxxxx web: http://www.pm-group.com -----Original Message----- From: Karl Stubsjoen [mailto:kstubs@xxxxxxxxx] Sent: 24 March 2005 19:25 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Catch ALL | Failed template rule Thank you Nicola: Iterating through and performing an exact check using a test method such as xsl:choose was what I was trying to avoid though. After reading through your example though, it does spark my interest in asking the question: What is fo? On Thu, 24 Mar 2005 13:42:16 -0000, Nicola Harlow <Nicola.Harlow@xxxxxxxxxxxx> wrote: > Hi Karl, > > Sorry if this is way off target, but I have just found a solution for a > similar problem that may help you. > > This is in XSL:FO, and may not be of any use to you, but you may be able > to adapt it. > > Basically I have a tag that searches for a glossary entry. When it finds > it, it creates a link to the glossary entry. If there is no entry, it > creates a broken link and spews forth some red text so I can find it > easily. > > <xsl:template match="glossarytt"> > <xsl:variable name="items" select="key('glossaryitems-by-name', > @name)"/> > > <xsl:choose> > <xsl:when test="$items"> > <xsl:for-each select="$items"> > <xsl:variable name="href" select="@name"/> > <fo:inline text-decoration="underline" > color="green" > font-weight="bold"> > <fo:basic-link > internal-destination="{$href}"> > <xsl:value-of select="term"/> > </fo:basic-link> > </fo:inline> > </xsl:for-each> > </xsl:when> > <xsl:otherwise><fo:basic-link > internal-destination="BrokenGlossaryTT"> > <fo:inline color="red">Broken glossarytt: > <xsl:value-of > select="@name"/></fo:inline></fo:basic-link> > </xsl:otherwise> > </xsl:choose> > </xsl:template> > > I don't know if this will quite cover what you want, but it certainly > works for me! > > (Thanks to J.Pietschmann) > > Nicola > > Nicola Harlow > Technical Author > The Program Management Group plc > tel: +44 (0) 1937 547 171 > direct: +44 (0) 1937 547 165 > fax: +44 (0) 1937 547 154 > mail: nicola.harlow@xxxxxxxxxxxx > web: http://www.pm-group.com
|
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
|

Cart








