Do you recognise this schema?

Discussion in 'Java' started by Roedy Green, Mar 26, 2008.

  1. Roedy Green

    Roedy Green Guest

    Here is a schema generated from the DTD for JNLP 6.

    It looks similar to XSD, but not quite. What is it?

    <?xml version="1.0" encoding="UTF-8" ?>

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <!-- Schema for a JNLP 6.0 -->

    <xs:element name="all-permissions" type="xs:string" />

    <xs:element name="applet-desc">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="height" type="xs:string" use="required" />
    <xs:attribute name="name" type="xs:string" use="required" />
    <xs:attribute name="main-class" type="xs:string" use="required"
    />
    <xs:attribute name="width" type="xs:string" use="required" />
    <xs:attribute name="documentbase" type="xs:string"
    use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="application-desc">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="argument" minOccurs="0" maxOccurs="unbounded"
    />
    </xs:sequence>
    <xs:attribute name="main-class" type="xs:string" use="optional"
    />
    </xs:complexType>
    </xs:element>

    <xs:element name="argument">
    <xs:complexType mixed="true" />
    </xs:element>

    <xs:element name="association">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="description" minOccurs="0" />
    <xs:element ref="icon" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="extensions" type="xs:string" use="required"
    />
    <xs:attribute name="mime-type" type="xs:string" use="required"
    />
    </xs:complexType>
    </xs:element>

    <xs:element name="component-desc" type="xs:string" />

    <xs:element name="description">
    <xs:complexType mixed="true">
    <xs:attribute name="kind" use="optional">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="one-line" />
    <xs:enumeration value="short" />
    <xs:enumeration value="tooltip" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    </xs:complexType>
    </xs:element>

    <xs:element name="desktop" type="xs:string" />

    <xs:element name="ext-download">
    <xs:complexType>
    <xs:attribute name="download" use="optional" default="eager">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="lazy" />
    <xs:enumeration value="eager" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="part" type="xs:string" use="optional" />
    <xs:attribute name="ext-part" type="xs:string" use="required" />
    </xs:complexType>
    </xs:element>

    <xs:element name="extension">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ext-download" minOccurs="0"
    maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="version" type="xs:string" use="optional" />
    <xs:attribute name="href" type="xs:string" use="required" />
    <xs:attribute name="name" type="xs:string" use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="homepage">
    <xs:complexType>
    <xs:attribute name="href" type="xs:string" use="required" />
    </xs:complexType>
    </xs:element>

    <xs:element name="icon">
    <xs:complexType>
    <xs:attribute name="height" type="xs:string" use="optional" />
    <xs:attribute name="version" type="xs:string" use="optional" />
    <xs:attribute name="href" type="xs:string" use="required" />
    <xs:attribute name="size" type="xs:string" use="optional" />
    <xs:attribute name="kind" type="xs:string" use="optional" />
    <xs:attribute name="width" type="xs:string" use="optional" />
    <xs:attribute name="depth" type="xs:string" use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="information">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="title" />
    <xs:element ref="vendor" />
    <xs:element ref="homepage" minOccurs="0" />
    <xs:element ref="description" minOccurs="0"
    maxOccurs="unbounded" />
    <xs:element ref="icon" minOccurs="0" maxOccurs="unbounded" />
    <xs:element ref="offline-allowed" minOccurs="0" />
    <xs:element ref="shortcut" minOccurs="0" />
    <xs:element ref="association" minOccurs="0" />
    <xs:element ref="related-content" minOccurs="0"
    maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="locale" type="xs:string" use="optional" />
    <xs:attribute name="platform" type="xs:string" use="optional" />
    <xs:attribute name="arch" type="xs:string" use="optional" />
    <xs:attribute name="os" type="xs:string" use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="installer-desc">
    <xs:complexType>
    <xs:attribute name="main-class" type="xs:string" use="optional"
    />
    </xs:complexType>
    </xs:element>

    <xs:element name="j2ee-application-client-permissions"
    type="xs:string" />

    <xs:element name="j2se">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="resources" minOccurs="0"
    maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="version" type="xs:string" use="required" />
    <xs:attribute name="href" type="xs:string" use="optional" />
    <xs:attribute name="max-heap-size" type="xs:string"
    use="optional" />
    <xs:attribute name="java-vm-args" type="xs:string"
    use="optional" />
    <xs:attribute name="initial-heap-size" type="xs:string"
    use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="jar">
    <xs:complexType>
    <xs:attribute name="main" use="optional" default="false">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="true" />
    <xs:enumeration value="false" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="download" use="optional" default="eager">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="eager" />
    <xs:enumeration value="lazy" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="version" type="xs:string" use="optional" />
    <xs:attribute name="href" type="xs:string" use="required" />
    <xs:attribute name="part" type="xs:string" use="optional" />
    <xs:attribute name="size" type="xs:string" use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="java">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="resources" minOccurs="0"
    maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="version" type="xs:string" use="required" />
    <xs:attribute name="href" type="xs:string" use="optional" />
    <xs:attribute name="max-heap-size" type="xs:string"
    use="optional" />
    <xs:attribute name="java-vm-args" type="xs:string"
    use="optional" />
    <xs:attribute name="initial-heap-size" type="xs:string"
    use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="jnlp">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="information" maxOccurs="unbounded" />
    <xs:element ref="security" minOccurs="0" />
    <xs:element ref="update" minOccurs="0" />
    <xs:element ref="resources" minOccurs="0"
    maxOccurs="unbounded" />
    <xs:choice>
    <xs:element ref="application-desc" />
    <xs:element ref="applet-desc" />
    <xs:element ref="component-desc" />
    <xs:element ref="installer-desc" />
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="version" type="xs:string" use="optional" />
    <xs:attribute name="href" type="xs:string" use="optional" />
    <xs:attribute name="spec" type="xs:string" use="optional" />
    <xs:attribute name="codebase" type="xs:string" use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="menu">
    <xs:complexType>
    <xs:attribute name="submenu" type="xs:string" use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="nativelib">
    <xs:complexType>
    <xs:attribute name="download" use="optional" default="eager">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="eager" />
    <xs:enumeration value="lazy" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="version" type="xs:string" use="optional" />
    <xs:attribute name="href" type="xs:string" use="required" />
    <xs:attribute name="part" type="xs:string" use="optional" />
    <xs:attribute name="size" type="xs:string" use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="offline-allowed" type="xs:string" />

    <xs:element name="package">
    <xs:complexType>
    <xs:attribute name="recursive" use="optional" default="false">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="true" />
    <xs:enumeration value="false" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="part" type="xs:string" use="required" />
    <xs:attribute name="name" type="xs:string" use="required" />
    </xs:complexType>
    </xs:element>

    <xs:element name="param">
    <xs:complexType>
    <xs:attribute name="name" type="xs:string" use="required" />
    <xs:attribute name="value" type="xs:string" use="required" />
    </xs:complexType>
    </xs:element>

    <xs:element name="property">
    <xs:complexType>
    <xs:attribute name="name" type="xs:string" use="required" />
    <xs:attribute name="value" type="xs:string" use="required" />
    </xs:complexType>
    </xs:element>

    <xs:element name="related-content">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="title" minOccurs="0" />
    <xs:element ref="description" minOccurs="0" />
    <xs:element ref="icon" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="href" type="xs:string" use="required" />
    </xs:complexType>
    </xs:element>

    <xs:element name="resources">
    <xs:complexType>
    <xs:choice>
    <xs:element ref="java" />
    <xs:element ref="j2se" />
    <xs:element ref="jar" />
    <xs:element ref="nativelib" />
    <xs:element ref="extension" />
    <xs:element ref="property" />
    <xs:element ref="package" />
    </xs:choice>
    <xs:attribute name="locale" type="xs:string" use="optional" />
    <xs:attribute name="arch" type="xs:string" use="optional" />
    <xs:attribute name="os" type="xs:string" use="optional" />
    </xs:complexType>
    </xs:element>

    <xs:element name="security">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="all-permissions" minOccurs="0" />
    <xs:element ref="j2ee-application-client-permissions"
    minOccurs="0" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>

    <xs:element name="shortcut">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="desktop" minOccurs="0" />
    <xs:element ref="menu" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="online" use="optional" default="true">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="true" />
    <xs:enumeration value="false" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    </xs:complexType>
    </xs:element>

    <xs:element name="title">
    <xs:complexType mixed="true" />
    </xs:element>

    <xs:element name="update">
    <xs:complexType>
    <xs:attribute name="check" use="optional" default="timeout">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="always" />
    <xs:enumeration value="timeout" />
    <xs:enumeration value="background" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="policy" use="optional" default="always">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="always" />
    <xs:enumeration value="prompt-update" />
    <xs:enumeration value="prompt-run" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    </xs:complexType>
    </xs:element>

    <xs:element name="vendor">
    <xs:complexType mixed="true" />
    </xs:element>

    </xs:schema>
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Mar 26, 2008
    #1
    1. Advertising

  2. Roedy Green

    Arne Vajhøj Guest

    Roedy Green wrote:
    > 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 ?

    Arne
    Arne Vajhøj, Mar 27, 2008
    #2
    1. Advertising

  3. On Mar 26, 7:53 pm, Roedy Green <>
    wrote:
    > Here is a schema generated from the DTD for JNLP 6.
    >
    > It looks similar to XSD, but not quite. What is it?
    >
    > <?xml version="1.0" encoding="UTF-8" ?>
    >
    > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    >
    > <!-- Schema for a JNLP 6.0 -->
    >
    >   <xs:element name="all-permissions" type="xs:string" />
    >
    >   <xs:element name="applet-desc">
    >     <xs:complexType>
    >       <xs:sequence>
    >         <xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
    >       </xs:sequence>
    >       <xs:attribute name="height" type="xs:string" use="required" />
    >       <xs:attribute name="name" type="xs:string" use="required" />
    >       <xs:attribute name="main-class" type="xs:string" use="required"
    > />
    >       <xs:attribute name="width" type="xs:string" use="required" />
    >       <xs:attribute name="documentbase" type="xs:string"
    > use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="application-desc">
    >     <xs:complexType>
    >       <xs:sequence>
    >         <xs:element ref="argument" minOccurs="0" maxOccurs="unbounded"
    > />
    >       </xs:sequence>
    >       <xs:attribute name="main-class" type="xs:string" use="optional"
    > />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="argument">
    >     <xs:complexType mixed="true" />
    >   </xs:element>
    >
    >   <xs:element name="association">
    >     <xs:complexType>
    >       <xs:sequence>
    >         <xs:element ref="description" minOccurs="0" />
    >         <xs:element ref="icon" minOccurs="0" />
    >       </xs:sequence>
    >       <xs:attribute name="extensions" type="xs:string" use="required"
    > />
    >       <xs:attribute name="mime-type" type="xs:string" use="required"
    > />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="component-desc" type="xs:string" />
    >
    >   <xs:element name="description">
    >     <xs:complexType mixed="true">
    >       <xs:attribute name="kind" use="optional">
    >         <xs:simpleType>
    >           <xs:restriction base="xs:NMTOKEN">
    >             <xs:enumeration value="one-line" />
    >             <xs:enumeration value="short" />
    >             <xs:enumeration value="tooltip" />
    >           </xs:restriction>
    >         </xs:simpleType>
    >       </xs:attribute>
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="desktop" type="xs:string" />
    >
    >   <xs:element name="ext-download">
    >     <xs:complexType>
    >       <xs:attribute name="download" use="optional" default="eager">
    >         <xs:simpleType>
    >           <xs:restriction base="xs:NMTOKEN">
    >             <xs:enumeration value="lazy" />
    >             <xs:enumeration value="eager" />
    >           </xs:restriction>
    >         </xs:simpleType>
    >       </xs:attribute>
    >       <xs:attribute name="part" type="xs:string" use="optional" />
    >       <xs:attribute name="ext-part" type="xs:string" use="required" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="extension">
    >     <xs:complexType>
    >       <xs:sequence>
    >         <xs:element ref="ext-download" minOccurs="0"
    > maxOccurs="unbounded" />
    >       </xs:sequence>
    >       <xs:attribute name="version" type="xs:string" use="optional" />
    >       <xs:attribute name="href" type="xs:string" use="required" />
    >       <xs:attribute name="name" type="xs:string" use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="homepage">
    >     <xs:complexType>
    >       <xs:attribute name="href" type="xs:string" use="required" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="icon">
    >     <xs:complexType>
    >       <xs:attribute name="height" type="xs:string" use="optional" />
    >       <xs:attribute name="version" type="xs:string" use="optional" />
    >       <xs:attribute name="href" type="xs:string" use="required" />
    >       <xs:attribute name="size" type="xs:string" use="optional" />
    >       <xs:attribute name="kind" type="xs:string" use="optional" />
    >       <xs:attribute name="width" type="xs:string" use="optional" />
    >       <xs:attribute name="depth" type="xs:string" use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="information">
    >     <xs:complexType>
    >       <xs:sequence>
    >         <xs:element ref="title" />
    >         <xs:element ref="vendor" />
    >         <xs:element ref="homepage" minOccurs="0" />
    >         <xs:element ref="description" minOccurs="0"
    > maxOccurs="unbounded" />
    >         <xs:element ref="icon" minOccurs="0" maxOccurs="unbounded" />
    >         <xs:element ref="offline-allowed" minOccurs="0" />
    >         <xs:element ref="shortcut" minOccurs="0" />
    >         <xs:element ref="association" minOccurs="0" />
    >         <xs:element ref="related-content" minOccurs="0"
    > maxOccurs="unbounded" />
    >       </xs:sequence>
    >       <xs:attribute name="locale" type="xs:string" use="optional" />
    >       <xs:attribute name="platform" type="xs:string" use="optional" />
    >       <xs:attribute name="arch" type="xs:string" use="optional" />
    >       <xs:attribute name="os" type="xs:string" use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="installer-desc">
    >     <xs:complexType>
    >       <xs:attribute name="main-class" type="xs:string" use="optional"
    > />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="j2ee-application-client-permissions"
    > type="xs:string" />
    >
    >   <xs:element name="j2se">
    >     <xs:complexType>
    >       <xs:sequence>
    >         <xs:element ref="resources" minOccurs="0"
    > maxOccurs="unbounded" />
    >       </xs:sequence>
    >       <xs:attribute name="version" type="xs:string" use="required" />
    >       <xs:attribute name="href" type="xs:string" use="optional" />
    >       <xs:attribute name="max-heap-size" type="xs:string"
    > use="optional" />
    >       <xs:attribute name="java-vm-args" type="xs:string"
    > use="optional" />
    >       <xs:attribute name="initial-heap-size" type="xs:string"
    > use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="jar">
    >     <xs:complexType>
    >       <xs:attribute name="main" use="optional" default="false">
    >         <xs:simpleType>
    >           <xs:restriction base="xs:NMTOKEN">
    >             <xs:enumeration value="true" />
    >             <xs:enumeration value="false" />
    >           </xs:restriction>
    >         </xs:simpleType>
    >       </xs:attribute>
    >       <xs:attribute name="download" use="optional" default="eager">
    >         <xs:simpleType>
    >           <xs:restriction base="xs:NMTOKEN">
    >             <xs:enumeration value="eager" />
    >             <xs:enumeration value="lazy" />
    >           </xs:restriction>
    >         </xs:simpleType>
    >       </xs:attribute>
    >       <xs:attribute name="version" type="xs:string" use="optional" />
    >       <xs:attribute name="href" type="xs:string" use="required" />
    >       <xs:attribute name="part" type="xs:string" use="optional" />
    >       <xs:attribute name="size" type="xs:string" use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="java">
    >     <xs:complexType>
    >       <xs:sequence>
    >         <xs:element ref="resources" minOccurs="0"
    > maxOccurs="unbounded" />
    >       </xs:sequence>
    >       <xs:attribute name="version" type="xs:string" use="required" />
    >       <xs:attribute name="href" type="xs:string" use="optional" />
    >       <xs:attribute name="max-heap-size" type="xs:string"
    > use="optional" />
    >       <xs:attribute name="java-vm-args" type="xs:string"
    > use="optional" />
    >       <xs:attribute name="initial-heap-size" type="xs:string"
    > use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="jnlp">
    >     <xs:complexType>
    >       <xs:sequence>
    >         <xs:element ref="information" maxOccurs="unbounded" />
    >         <xs:element ref="security" minOccurs="0" />
    >         <xs:element ref="update" minOccurs="0" />
    >         <xs:element ref="resources" minOccurs="0"
    > maxOccurs="unbounded" />
    >         <xs:choice>
    >           <xs:element ref="application-desc" />
    >           <xs:element ref="applet-desc" />
    >           <xs:element ref="component-desc" />
    >           <xs:element ref="installer-desc" />
    >         </xs:choice>
    >       </xs:sequence>
    >       <xs:attribute name="version" type="xs:string" use="optional" />
    >       <xs:attribute name="href" type="xs:string" use="optional" />
    >       <xs:attribute name="spec" type="xs:string" use="optional" />
    >       <xs:attribute name="codebase" type="xs:string" use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="menu">
    >     <xs:complexType>
    >       <xs:attribute name="submenu" type="xs:string" use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="nativelib">
    >     <xs:complexType>
    >       <xs:attribute name="download" use="optional" default="eager">
    >         <xs:simpleType>
    >           <xs:restriction base="xs:NMTOKEN">
    >             <xs:enumeration value="eager" />
    >             <xs:enumeration value="lazy" />
    >           </xs:restriction>
    >         </xs:simpleType>
    >       </xs:attribute>
    >       <xs:attribute name="version" type="xs:string" use="optional" />
    >       <xs:attribute name="href" type="xs:string" use="required" />
    >       <xs:attribute name="part" type="xs:string" use="optional" />
    >       <xs:attribute name="size" type="xs:string" use="optional" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="offline-allowed" type="xs:string" />
    >
    >   <xs:element name="package">
    >     <xs:complexType>
    >       <xs:attribute name="recursive" use="optional" default="false">
    >         <xs:simpleType>
    >           <xs:restriction base="xs:NMTOKEN">
    >             <xs:enumeration value="true" />
    >             <xs:enumeration value="false" />
    >           </xs:restriction>
    >         </xs:simpleType>
    >       </xs:attribute>
    >       <xs:attribute name="part" type="xs:string" use="required" />
    >       <xs:attribute name="name" type="xs:string" use="required" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="param">
    >     <xs:complexType>
    >       <xs:attribute name="name" type="xs:string" use="required" />
    >       <xs:attribute name="value" type="xs:string" use="required" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="property">
    >     <xs:complexType>
    >       <xs:attribute name="name" type="xs:string" use="required" />
    >       <xs:attribute name="value" type="xs:string" use="required" />
    >     </xs:complexType>
    >   </xs:element>
    >
    >   <xs:element name="related-content">
    >     <xs:complexType>
    >       <xs:sequence>
    >         <xs:element ref="title" minOccurs="0" />
    >         <xs:element ref="description" minOccurs="0" />...
    >
    > read more »


    It *is* XSD. However, the DTD->XSD translation has (sensibly enough)
    translated all the <!ELEMENT DTD components into top-level <element>
    components in the schema, resulting in a schema with many anonymous
    complex types and many top-level elements, which is unusual (IME).

    A more idiomatic translation would have many named complex types and
    one or a very few top-level elements. This schema allows for, eg., a
    document composed only of

    <param name="x" value="y" />

    to be valid.
    Owen Jacobson, Mar 27, 2008
    #3
  4. Roedy Green

    Roedy Green Guest

    On Wed, 26 Mar 2008 21:10:48 -0400, Arne Vajhøj <>
    wrote, quoted or indirectly quoted someone who said :

    >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?
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Mar 27, 2008
    #4
  5. Roedy Green

    Lew Guest

    Roedy Green wrote:
    > On Wed, 26 Mar 2008 21:10:48 -0400, Arne Vajhøj <>
    > wrote, quoted or indirectly quoted someone who said :
    >
    >> 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.

    --
    Lew
    Lew, Mar 27, 2008
    #5
  6. On Mar 27, 6:24 am, Roedy Green <>
    wrote:
    > On Wed, 26 Mar 2008 21:10:48 -0400, Arne Vajhøj <>
    > wrote, quoted or indirectly quoted someone who said :
    >
    > >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
    Owen Jacobson, Mar 27, 2008
    #6
  7. Roedy Green

    Mark Space Guest

    Owen Jacobson wrote:

    >
    > 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.
    Mark Space, Mar 27, 2008
    #7
  8. Roedy Green

    Arne Vajhøj Guest

    Mark Space wrote:
    > Owen Jacobson wrote:
    >> 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.


    I think he meant that the choice of namespace prefix is for
    human consumption.

    Namespaces are definitely not.

    Arne
    Arne Vajhøj, Mar 27, 2008
    #8
  9. Roedy Green

    Arne Vajhøj Guest

    Roedy Green wrote:
    > On Wed, 26 Mar 2008 21:10:48 -0400, Arne Vajhøj <>
    > wrote, quoted or indirectly quoted someone who said :
    >> 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
    Arne Vajhøj, Mar 27, 2008
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    319
    Patrice
    Jan 17, 2006
  2. Glenn McCall
    Replies:
    1
    Views:
    6,087
    Michael Black
    Feb 20, 2005
  3. RayKnight
    Replies:
    6
    Views:
    411
    Virgil Green
    Mar 28, 2005
  4. Markus
    Replies:
    1
    Views:
    1,530
    Markus
    Nov 23, 2005
  5. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,251
    Stanimir Stamenkov
    Apr 25, 2005
Loading...

Share This Page