> Here is a schema generated from the DTD for JNLP 6.
>
> It looks similar to XSD, but not quite. What is it?
>Which part is not valid W3C XML Schema ?
The XSD schema have for JNLP 1.0 has <xsd all over instead of <xs
What is the difference?

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Lew - 27 Mar 2008 13:45 GMT
>> Which part is not valid W3C XML Schema ?
>
> The XSD schema have for JNLP 1.0 has <xsd all over instead of <xs
>
> What is the difference?
The namespace prefix, the part prior to the colon in each element tag, is set
within the document itself and is arbitrary. The prefix is a local alias to
the full namespace. If the prefixes differ but alias the same namespace, then
they are the same namespace.
The root element of the schema you posted is:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
This "xmlns:xs=" attribute sets the _XML_ _n_ame_s_pace prefix 'xs' to alias
the 'http://www.w3.org/2001/XMLSchema' namespace.
'xsd' and 'xs' are both conventional XML Schema prefixes.

Signature
Lew
Owen Jacobson - 27 Mar 2008 15:46 GMT
On Mar 27, 6:24 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> >Which part is not valid W3C XML Schema ?
>
> The XSD schema have for JNLP 1.0 has <xsd all over instead of <xs
>
> What is the difference?
None whatsoever. Namespace prefixes are intended for human
consumption; correctly-written tools will map tags to element
definitions (from schemas, etc) using the namespace URI, not the
prefix.
In the schema you posted, the root element looks like:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- ... -->
</xs:schema>
The xmlns:xs attribute binds the 'xs' namespace prefix to the URL
'http://www.w3.org/2001/XMLSchema'. It could just as easily have been
xmlns:xsd and the element itself <xsd:schema>, or just xmlns
(no :prefix), and <schema>, which is my own preference. The document
would be the same in all three cases.
-o
Mark Space - 27 Mar 2008 20:45 GMT
> None whatsoever. Namespace prefixes are intended for human
> consumption; correctly-written tools will map tags to element
Huh. I'm not sure about the "human consumption" part. I was under the
impression that prefix were added to prevent name collisions. If your
XML file uses an element <name> and my XML file does too, then
namespaces provide a means for the top level document to distinguish
between them. And I mean programmatically, not people.
I suspect you knew this, your phrasing sounded off though.
Arne Vajhøj - 27 Mar 2008 21:38 GMT
>> None whatsoever. Namespace prefixes are intended for human
>> consumption; correctly-written tools will map tags to element
[quoted text clipped - 6 lines]
>
> I suspect you knew this, your phrasing sounded off though.
I think he meant that the choice of namespace prefix is for
human consumption.
Namespaces are definitely not.
Arne
Arne Vajhøj - 27 Mar 2008 21:40 GMT
>> Which part is not valid W3C XML Schema ?
>
> The XSD schema have for JNLP 1.0 has <xsd all over instead of <xs
>
> What is the difference?
As other already have stated then there are no difference.
The author of the XML decide which prefix he would like to
use for each namespace.
xsd and xs are both commonly used for http://www.w3.org/2001/XMLSchema.
I prefer xsd, but ...
Arne