You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by denit thomas <de...@yahoo.co.in> on 2009/08/26 09:16:51 UTC

IE does not comprehend default namespace in XML

Hi All,
I am using an XSLT to parse an XML to produce a text file. The issue is that if I use the Internet Explorer to open this xml, it does not render anything except the hardcoded text that I have in the XSLT, when I have the xmlns="www.ncr.com/ocz" attribute in the root node of the xml. As soon as I remove this attibute, it works fine and the xslt gets applied. I need to keep this attribute in the xml as I have an XSD for this xml and thus need this default namespace in xml.

So for developing/writing the xml, I need to keep the xmlns attribute in the xml, while trying to render it using an xslt (defined in xml as <?xml-stylesheet type="text/xsl" href="PIDRepresentation.xslt"?>), I have to remove it from the xml.

Can anyone suggest what I am missing here and how to make IE render the xml even with the presence of xmlns attribute?

Here is the piece from the XML.

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="PIDRepresentation.xslt"?>
<model xmlns="www.ncr.com/ocz"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="www.ncr.com/ocz PIDSchema.xsd" 
    name="SAHI-EasyPoint 3XXX Series (5020 UEPP Upgrade)"
    createMode="both" notes="">

///// all other child tags

</model>

I am using IE 6.0

Thanks & Regards,
Denit




      Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com

Re: IE does not comprehend default namespace in XML

Posted by denit thomas <de...@yahoo.co.in>.
Oops! Thanks Mukul...

Regads,
Denit

--- On Wed, 26/8/09, Mukul Gandhi <ga...@gmail.com> wrote:

From: Mukul Gandhi <ga...@gmail.com>
Subject: Re: IE does not comprehend default namespace in XML
To: j-users@xerces.apache.org
Date: Wednesday, 26 August, 2009, 1:06 PM

Hi Denit,
  This question seems, off-topic for this list, as it doesn't involve Xerces-J.

I think, following forum would be more appropriate to ask this question:

http://www.mulberrytech.com/xsl/xsl-list/index.html

On Wed, Aug 26, 2009 at 12:46 PM, denit thomas<de...@yahoo.co.in> wrote:
> Hi All,
> I am using an XSLT to parse an XML to produce a text file. The issue is that
> if I use the Internet Explorer to open this xml, it does not render anything
> except the hardcoded text that I have in the XSLT, when I have the
> xmlns="www.ncr.com/ocz" attribute in the root node of the xml. As soon as I
> remove this attibute, it works fine and the xslt gets applied. I need to
> keep this attribute in the xml as I have an XSD for this xml and thus need
> this default namespace in xml.
>
> So for developing/writing the xml, I need to keep the xmlns attribute in the
> xml, while trying to render it using an xslt (defined in xml as
> <?xml-stylesheet type="text/xsl" href="PIDRepresentation.xslt"?>), I have to
> remove it from the xml.
>
> Can anyone suggest what I am missing here and how to make IE render the xml
> even with the presence of xmlns attribute?
>
> Here is the piece from the XML.
>
> <?xml version="1.0" encoding="utf-8"?>
> <?xml-stylesheet type="text/xsl" href="PIDRepresentation.xslt"?>
> <model xmlns="www.ncr.com/ocz"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="www.ncr.com/ocz PIDSchema.xsd"
>     name="SAHI-EasyPoint 3XXX Series (5020 UEPP Upgrade)"
>     createMode="both" notes="">
>
> ///// all other child tags
>
> </model>
>
> I am using IE 6.0
>
> Thanks & Regards,
> Denit



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org




      Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com

Re: IE does not comprehend default namespace in XML

Posted by Mukul Gandhi <ga...@gmail.com>.
Hi Denit,
  This question seems, off-topic for this list, as it doesn't involve Xerces-J.

I think, following forum would be more appropriate to ask this question:

http://www.mulberrytech.com/xsl/xsl-list/index.html

On Wed, Aug 26, 2009 at 12:46 PM, denit thomas<de...@yahoo.co.in> wrote:
> Hi All,
> I am using an XSLT to parse an XML to produce a text file. The issue is that
> if I use the Internet Explorer to open this xml, it does not render anything
> except the hardcoded text that I have in the XSLT, when I have the
> xmlns="www.ncr.com/ocz" attribute in the root node of the xml. As soon as I
> remove this attibute, it works fine and the xslt gets applied. I need to
> keep this attribute in the xml as I have an XSD for this xml and thus need
> this default namespace in xml.
>
> So for developing/writing the xml, I need to keep the xmlns attribute in the
> xml, while trying to render it using an xslt (defined in xml as
> <?xml-stylesheet type="text/xsl" href="PIDRepresentation.xslt"?>), I have to
> remove it from the xml.
>
> Can anyone suggest what I am missing here and how to make IE render the xml
> even with the presence of xmlns attribute?
>
> Here is the piece from the XML.
>
> <?xml version="1.0" encoding="utf-8"?>
> <?xml-stylesheet type="text/xsl" href="PIDRepresentation.xslt"?>
> <model xmlns="www.ncr.com/ocz"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="www.ncr.com/ocz PIDSchema.xsd"
>     name="SAHI-EasyPoint 3XXX Series (5020 UEPP Upgrade)"
>     createMode="both" notes="">
>
> ///// all other child tags
>
> </model>
>
> I am using IE 6.0
>
> Thanks & Regards,
> Denit



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: IE does not comprehend default namespace in XML

Posted by ke...@us.ibm.com.
> is that if I use the Internet Explorer to open this xml, it does not
> render anything except the hardcoded text that I have in the XSLT, 
> when I have the xmlns="www.ncr.com/ocz" attribute in the root node 
> of the xml. As soon as I remove this attibute, it works fine and the
> xslt gets applied.

Sounds like your stylesheet isn't written to operate against that 
namespace, and all that's matching is the default template -- which copies 
 only the text content of the element.

Hope that gets you pointed in the right direction. If not, this is either 
a general XSLT usage question or an IE question.