Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Access on element on XML document by XSLT.

From: "guoqi zheng" <no@-----.--->
To: NULL
Date: 1/21/2008 4:13:00 PM

It works now.

Thank you

Regards,

Guoqi Zheng
Http://www.ureader.com

"Anthony Jones" <AnthonyJones@d...> wrote in message 
news:D65EC4CF-B684-43CC-BDE4-BB9C06352FD2@m......
>
>
> "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
> 




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