This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
position of a child node
Hi all:
I hope I can get an answer to these questions:
Suppose I have the following portion of an xml file
<testcase>
<child1>first text</child1>
<child2>
<child21>
some text here
</child21>
</child2>
</testcase>
and my context node is "testcase" and I want to find out the position of the
descendant text node "some text here", whats the easiest way to do that?, I
been
playing with "<xsl:number>" and "count()" with no success.
I really will want to know that position without having to change my context
node, which leads me to another question ....., if I do traverse the tree
down
to where the text is, Is there a way to change the context node back to
"testcase"?
Greetings,
Carmelo Montanez
----- Original Message -----
From: "Chen, Gin" <Gin_Chen@tvratings.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Thursday, November 15, 2001 12:09 PM
Subject: RE: [xsl] OK, stupid Q time
> Okay... everyone seems to agree that it is <BR/>.
> My question then is.. how do you get that BR to be displayed when
> translating the XML with a XSL?
> For example:
> My XML has this
> <paragraph>This is my first <BR/> page</paragraph>
> And my XSL has this
> <font color="red"><xsl:value-of select="paragraph"/></font>
> But it seems to ignore the <BR/>. I get output like:
> This is my first page
> I set the output to html using:
> <xsl:output method="html"/>
> -Tim
>
> -----Original Message-----
> From: David Carlisle [mailto:davidc@nag.co.uk]
> Sent: Thursday, November 15, 2001 11:47 AM
> To: xsl-list@lists.mulberrytech.com
> Subject: Re: [xsl] OK, stupid Q time
>
>
>
> It's XML: empty BR is <BR/>
>
> _____________________________________________________________________
> This message has been checked for all known viruses by Star Internet
> delivered through the MessageLabs Virus Scanning Service. For further
> information visit http://www.star.net.uk/stats.asp or alternatively call
> Star Internet for details on the Virus Scanning Service.
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list