xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geeta Gudavalli" <ggudava...@McLeodUSA.com>
Subject AW: xsl-fo-pdf
Date Thu, 04 Jan 2001 22:18:58 GMT


Hello,
     I have the following code in my program
<xsl:template match="test">
     <xsl:apply-templates select="test[1]" mode="first"/>
</xsl:template>
<xsl:template match="test" mode="first">
I want to use two style sheets to make one pdf form(pdf form will have two
pages)  if there are two of the same tags other wise only one style sheet.

This code works as long as I have two of those tags (one).  If there is only one
 tag, I am having problem.  It is not populating the values in to pdf.
Can you help me out? I am in big jam because of this.  Any help is greatly
appreciated.
Thank you,
Geeta
---------------------- Forwarded by Geeta Gudavalli/MCLEOD on 01/04/2001 04:20
PM ---------------------------


"Volker.Reichel" <Volker.Reichel@freenet.de> on 01/04/2001 02:51:03 AM

Please respond to fop-dev@xml.apache.org

To:   fop-dev@xml.apache.org
cc:    (bcc: Geeta Gudavalli/MCLEOD)
Subject:  AW: xsl-fo-pdf



Hello Geeta,

could you please be a bit more specific about what you want to do?
I see at least two possible answers to your question.

Alternative 1:
The second <one>...</one> element structure should be matched against a
different stylesheet than the first <one>...</one> structure.
If this interpretation is what you want than you could use two templates
the first one should be like:

<template match="test/one[1]"> .... your code for the first
<one>...</one></template>

<template match="test/one[2]"> .... your code for the second ... </template>

Alternative 2:
Each structure should be processed by two different templates
If this is your intension then you can use modes to get the result you
are looking for

<template match="test">
     <apply-templates select="one" mode="first_encounter"/>
     <apply-templates select="one" mode="second_encounter"/>
</template>

<template match="one" mode="first_encounter">
....
</template>

<template match="one" mode="second_encounter">
....
</template>


Hope this helps

Volker


> -----Ursprungliche Nachricht-----
> Von: Geeta Gudavalli [mailto:ggudavalli@McLeodUSA.com]
> Gesendet: Mittwoch, 3. Januar 2001 19:41
> An: fop-dev@xml.apache.org
> Betreff: AW: xsl-fo-pdf
>
>
>
>
> Hello,
>      I need help real bad.  I have two same tags in my xml file like
> <test>
>      <one>
>           <data>
>      </one.
>      <one>
>           <data>
>      </one>
> I need to apply two diffrent xls style sheets for these two tags.
>  How can I do
> that?  I appreciate your help.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org






Mime
View raw message