xsl-list
[Top] [All Lists]

RE: [xsl] XML /XSLT Namespace problem

2007-08-22 14:24:46
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(_at_)hotmail(_dot_)com] 
Sent: 22 August 2007 21:46
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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.



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>