RE: [xsl] XML /XSLT Namespace problem

Subject: RE: [xsl] XML /XSLT Namespace problem
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 22 Aug 2007 22:24:28 +0100
This is a very common question, googling for "XSLT default namespace" will
give you lots of posts on the subject. In XSLT 1.0, you need to change all
your references to the elements to use a prefix, for example
select="x:NewDataSet" where the xsl:stylesheet (typically) says
xmlns:x="MyFeed".

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Waqar Ali [mailto:waqarali_pk@xxxxxxxxxxx] 
> Sent: 22 August 2007 21:46
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] XML /XSLT Namespace problem
> 
> My XML file looks like
> 
> <?xml version="1.0" encoding="utf-8" ?>
> <NewDataSet>
> ....
> </NewDataSet>
> 
> When I transform this into a text file using XSLT, it works 
> perfectly ok.
> 
> But when I add a namespace to the XML file, the XSLT produces nothing.
> 
> <?xml version="1.0" encoding="utf-8" ?>
> <NewDataSet xmlns="MyFeed">
> ....
> </NewDataSet>
> 
> What changes do I need to make to the XSLT to make it work 
> with the namespace addition.
> 
> Thank you.

Current Thread