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

Re: XSL:problem printing the values in between two tag

Subject: Re: XSL:problem printing the values in between two tags
From: "Jaebin Lee" <jaebin.charade@xxxxxxxxx>
Date: Sun, 10 Sep 2006 18:46:36 +0200
xsl to print xml
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

On 9/10/06, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
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

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.