![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Access on element on XML document by XSLT. >Thread Next - Re: Access on element on XML document by XSLT. RE: Access on element on XML document by XSLT.To: NULL Date: 1/21/2008 5:53:00 AM "guoqi zheng" wrote: > Dear Sir, > > I have below XML file > ------------ XML ------------ > <tcm:Content> > <Content xmlns="uuid:ACAB60FE-A0C2-4C97-BC61-914072147396"> > <Question>Aandelenfonds</Question> > </Content> > </tcm:Content> > ------------ end of XML -------- > > I am trying to select the value on <Question> by XSLT, I used the value of > tag as below > > <xsl:value-of select="tcm:Content/Content/Question"/> > > Apparently, it does not work out because of the > xmlns="uuid:ACAB60FE-A0C2-4C97-BC61-914072147396". > > What should I do here? > You should add the attribute:- xmlns:a="uuid:ACAB60FE-A0C2-4C97-BC61-914072147396" to the xsl:stylesheet element Then your Xpath can be:- <xsl:value-of select="tcm:Content/a:Content/a:Question"/> I'm assuming there is already a namespace for the tcm alias defined in both the XML and the XSL files. -- Anthony Jones - MVP ASP/ASP.NET | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
