We help IT Professionals succeed at work.

xml - Namespace Prefix 'xsl' is not defined

I am a newbie in xml use.and trying to write some code

1) Want does Namespace Prefix 'xsl' is not defined mean?

2) what is the difference between,  xmlns:xsd="http://www.w3.org/1999/xmlschema> and xmlns:xsd="http://www.w3.org/2001/xmlschema>

3) How to convert xmlns:xsd="http://www.w3.org/1999/xmlschema> to xmlns:xsd="http://www.w3.org/2001/xmlschema>

Thanks
Comment
Watch Question

Gertone (Geert Bormans)Information Architect
Top Expert 2006

Commented:
1)
An XSLT schould have an binding to indicate that the xsl: prefix belongs to the xslt stylesheet namespace

<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
Gertone (Geert Bormans)Information Architect
Top Expert 2006

Commented:
2)
You should use the schema namespace as such
http://www.w3.org/2001/XMLSchema

I assume the other is referring to an old draft but has no "special" status
Gertone (Geert Bormans)Information Architect
Top Expert 2006

Commented:
3)
The clean way would be to use an XSLT to swap the namespace,
but you might as well read the text stream of the schema in any programming languag (make sure you don't mess up the encoding) and regex the 1999 into 2001

Author

Commented:
Thanks,  This what I have currently
<ManagementPackFragment SchemaVersion="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Instead - I should use

SchemaVersion="2.0"   xmlns:xsl="http://www.w3.org/2001/XSL/Transform" xmlns:xsl="http://www.w3.org/2001/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Also can I copy and paste the earlier code in newer version?

Thanks
Information Architect
Top Expert 2006
Commented:
Can you phrase your questions somewhat more clear?
This is all really vague
If I look at what you need in the output you bind the xsl prefix twice, that is not allowed

I think you are running a processnot just validation
and I think that in your process you are using an XML as an XSLT for a transform,
but you are referencing a file that is not an XSLT
You can not patch it by adding the namespace, you need to reference the right XSLT

But all of this is guessing against the wind.
Please tell us what you are trying to achieve,
give us some context, some source XML files and an indication of the tools you are using so we can really help you