[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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@xxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, November 15, 2001 12:09 PM Subject: RE: 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@xxxxxxxxx] > Sent: Thursday, November 15, 2001 11:47 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: 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
|
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
|