Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Pattern problem

From: "Joe Fawcett" <joefawcett@---------.------>
To: NULL
Date: 8/12/2008 5:17:00 PM



"tshad" <tfs@d...> wrote in message 
news:eFEpEnI$IHA.3696@T......
>
> "Joe Fawcett" <joefawcett@n...> wrote in message 
> news:%23%23DITRE$IHA.3472@T......
>> When you say the name do you mean the formName element, name doesn't make 
>> sense as the element name is form which you already know?
>> <xsl:value-of select="ancestor::form[primary='true']/formName"/>
>
> Actually, the result I showed that I was looking for, was incorrect. 
> Sorry.
>
> What I wanted the last set to look like was:
>
>  <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <sectionNumber>0</sectionNumber>
>    <primary>false</primary>
>    <formName>1004_05</formName>                      <-------- Want it to 
> look like this.
>    <tagName>GR_AGE.1</tagName>
>    <flags>1</flags>
>    <format>4096</format>
>    <value>4 Yrs.</value>
>  </form>
>
> and I realize oneof my mistakes was that I don't want "name", but "@name".
>
> Would I change you line to:
>
> <xsl:value-of select="ancestor::form[primary='true']/@name"/>
>

That looks right.

>>
>> "I was just guessing on this  statement and not sure how to get it to 
>> work"
>> You're not going to get far in XSLT like this, get a good reference such 
>> as Michael Kay's latest tome from Wrox, XSLT 4th Edition.
>
> I will.
>
> I only have the O'Reilly book (Learning XSLT).

That should be fine, just take a look at predicates in XPath.

>
> Thanks,
>
> Tom

-- 

Joe Fawcett (MVP - XML)
http://joe.fawcett.name
 



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent