Subject: RE: [xsl] Newbie - trying to extract specific values from XML file. From: cknell@xxxxxxxxxx Date: Fri, 19 Mar 2004 07:06:17 -0500 |
Write templates to match these conditions, for example: <xsl:template match="Answer[@name='Female']"> <!-- Your code here --> </xsl:template> <xsl:template match="Answer[@name='ticdesc']"> <xsl:value-of select="TextValue" /> </xsl:template> -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: Julian Voelcker <asp@xxxxxxx> Sent: Thu, 18 Mar 2004 16:18:55 GMT To: undisclosed-recipients:; Subject: [xsl] Newbie - trying to extract specific values from XML file. I am trying to do a xslt transformation that extracts specific values from an XML file. The XML file is formatted as follows:- <AnswerSet title = "Test File"> <Answer name = "ABGRbefore"> <RptValue> <TFValue>true</TFValue> <TFValue>false</TFValue> <TFValue>false</TFValue> </RptValue> </Answer> <Answer name = "Female"> <TFValue>false</TFValue> </Answer> <Answer name = "ticdesc"> <TextValue>my collection of teapots</TextValue> </Answer> </AnswerSet> The sort of things I want to be able to do is: 1. Establish if the TFValue for Answer name Female is true or false and then vary the info that is displayed. 2. Display the TextValue for the Answer name ticdesc. Anybody here willing to either knock up some XSL that will enable me to do this or point me in the right direction? Thanks in advance. -- Cheers, Julian Voelcker Cirencester, United Kingdom XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Newbie - trying to extrac, Julian Voelcker | Thread | Re: [xsl] Newbie - trying to extrac, Julian Voelcker |
RE: [xsl] breaking up a big xml fil, Ragulf Pickaxe | Date | [xsl] Tool and XSL, Gianni Ferrari |
Month |