Subject: Re: [xsl] XSL:problem printing the values in between two tags From: "Jaebin Lee" <jaebin.charade@xxxxxxxxx> Date: Sun, 10 Sep 2006 18:46:36 +0200 |
Thank you for the reply. It worked! I had another question, now if I want to change the line whenever <lb> comes in between the values but it seems that select="." prints out the value at once. Is there any way around to get away with that?
Thank you! -Jaebin
With XSLT 1.0, following will do what you want:
<xsl:template match="p"> <xsl:value-of select="." /> </xsl:template>
On 9/10/06, Jaebin Lee <jaebin.charade@xxxxxxxxx> wrote: > Hi, > > I'm new to using XSL and encountered with a problem where I try printing > some values that reside in between two tags in TEI xml file. > > The xml part where I'm having problem is as: > > > <p TEIform="p"> > Translation from italiano to castellano by Antonio Gabald=F3n; > <lb TEIform="lb" /> > Subject: Teatro: tragedia; > <lb TEIform="lb" /> > Type: Manuscrito MONOGRAFIA; > </p> > > From here, I want to print out the every value that is in <p> tag, > but I'm only successful in getting only the value from first line > which is: Translation > from italiano to castellano by Antonio Gabald=F3n; > I first thought the two other values below (that is Subject: Teatro: > tragedial;, Type: Manuscrito MONOGRAFIA;) belong to <lb> tag, but > obviously this is not because <lb> tag is opened and closed before the text > value comes. > So I believe that these text values all belong to <p> node, but haven't bee= > n > able to print out the last 2 values that are each under the <lb> tag... > > Shouldn't > <xsl:template match="p"> > <xsl:value-of select="node()"/> > <xsl:template match/> > print out all the values theoretically? > I also tried putting them inside of <for-each> tag with descendant-or-self::* > but still the same result. > > Could anyone suggest a way to print the other two values? > I'd really appreciate it if you could please help. > > Thank you. > -Jaebin
-- Regards, Mukul Gandhi
http://gandhimukul.tripod.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSL:problem printing the , Mukul Gandhi | Thread | Re: [xsl] XSL:problem printing the , Mukul Gandhi |
Re: [xsl] XSL:problem printing the , Mukul Gandhi | Date | Re: [xsl] Removing all line breaks , Mark Peters |
Month |