[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: block and templates.
Hmm, that doesn't seem to be it. When this template is called: <xsl:template match="t"> <fo:block keep-together="always" start-indent="1.25in"> <xsl:apply-templates /> </fo:block> </xsl:templates> My interpretation is that any thing that has a <t> tag is indented. When this template is called: <xsl:template match="line"> <fo:block line-hieght="2.0"> <xsl:value-of select="./@number" /> <xsl:value-of select="./line"/> <xsl:apply-templates /> </fo:block> </xsl:template> I believe it is saying everything inside line tag is printed. The more I mess around with things, I've noticed that I don't need <xsl:value-of select="./line" />. 1.) Because its not a correct statement (as you pointed out), and 2.) the apply-templates is making a call similar to <xsl:value-of select="." />. So if I have another value of, my lines are getting printed twice. What I can't seem to handle is when I indent a specific line, and then jump to handling the rest of the lines. So I believe what it comes down to is can I specify HOW it applies the template? So if I have the following XML: <line number ="1"> <t>a;a;kljaf;dkfja;dfkj</t> </line> Can I handle the <t> tags within the line template? Thanks! On Thu, 2006-09-21 at 21:22 +0200, Florent Georges wrote: > Luke Jones wrote: > > > Input looks something like this. > > > <para> > > <line number="3"> > > <t>This is the first sentence in a paragraph.</t> > > </line> > > <line number="4"> > > This is the second line in a paragraph. > > </line> > > </para> > > You didn't say what to do with the second line (have the whitespaces > at the beginning of the text node to be kept?). Maybe your can adapt > this: > > <xsl:value-of select="@number"/> > <xsl:text> </xsl:text> > <xsl:value-of select="normalise-spaces(.)"/> > > Not tested. > > Regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > ___________________________________________________________________________ > DC)couvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! > Yahoo! Questions/RC)ponses pour partager vos connaissances, vos opinions et vos expC)riences. > http://fr.answers.yahoo.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
|