Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Problem retrieving value [Thread Next] Re: Problem retrieving valueTo: NULL Date: 12/1/2004 1:09:00 AM AlBruAn wrote: > I'm in the process of creating an XSL file to handle XML transformation from > one document into another and don't quite know how to retrieve values to copy > over. At some point in time, the source XML was modified from > <field name="BranchPlant">30</field> > to > <field name="BranchPlant" value="30"/> > > I don't have any problem returning the value of 30 in the original XML > layout, using <xsl:value-of select="*[.//@name='BranchPlant']"/>, but can't > retrieve it for the revised layout. First, I'd make that... <xsl:value-of select="*[@name='BranchPlant']"/> What you want is the attribute "value"'s value instead of the text content, so change that to...: <xsl:value-of select="*[@name='BranchPlant']/@value"/> > How do I go about retrieving the value for a field when the value is stored > as the second attribute of a node? Best regards, Julian | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
