![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Pattern problem [Thread Next] Re: Pattern problemTo: 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 | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
