W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2004

am i cracy?

From: Nikolas Nehmer <Nikolas.Nehmer@t-online.de>
Date: Sat, 24 Jan 2004 01:32:08 +0100
To: <xmlschema-dev@w3.org>
Message-ID: <000201c3e211$80384a80$0200a8c0@cancin>
I there,
 
I don't have any idea?!?!
 
I have the following XSD files:
 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
targetNamespace="http://www.iese.fhg.de/Publication/ProjThesis"
xmlns:iese.Publication="http://www.iese.fhg.de/Publication"
xmlns:iese.ProjThesis="http://www.iese.fhg.de/Publication/ProjThesis"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
       <xs:import namespace="http://www.iese.fhg.de/Publication"
schemaLocation="Publication.xsd"/>
       <xs:element name="ProjThesis"
type="iese.Publication:Publication"/>
</xs:schema>
 
 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.iese.fhg.de/Publication"
xmlns:iese.Publication="http://www.iese.fhg.de/Publication"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
       <xs:element name="Publication"
type="iese.Publication:Publication"/>
       <xs:complexType name="Publication">
             <xs:sequence>
                    <xs:element name="title" type="xs:string"/>
                    <xs:element name="date" type="xs:date"/>
                    <xs:element name="abstract" type="xs:string"/>
                    <xs:element name="rating" type="xs:string"/>
                    <xs:element name="location" type="xs:string"/>
                    <xs:element name="confidentiality"
type="xs:string"/>
                    <xs:element name="author" maxOccurs="unbounded">
                           <xs:complexType>
                                 <xs:anyAttribute
namespace="http://www.w3.org/1999/xlink"/>
                           </xs:complexType>
                    </xs:element>
             </xs:sequence>
       </xs:complexType>
</xs:schema>
 
 
And a corresponding XML FILE:
 
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../../XSL/publication.xsl"?>
<ProjThesis
xmlns.iese.ProjThesis="http://www.iese.fhg.de/Publication/ProjThesis"
xmlns:iese.Publication="http://www.iese.fhg.de/Publication"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.iese.fhg.de ../../../XSD/ProjThesis.xsd">
       <iese.Publication:title>Wavelet
Kompression</iese.Publication:title>
       <iese.Publication:date>2004-01-06</iese.Publication:date>
 
<iese.Publication:abstract>abstract...</iese.Publication:abstract>
       <iese.Publication:rating>top</iese.Publication:rating>
 
<iese.Publication:location>http://www.iese.fhg.de</iese.Publication:loca
tion>
       <iese.Publication:confidentiality>top
secret</iese.Publication:confidentiality>
       <iese.Publication:author xlink:type="simple" xlink:show="replace"
xlink:href="../../../XML/Person/person_NikolasNehmer.xml"/>
</ProjThesis>
 
 
Why is this file valid? I don't declare any default NS so in opinion I
need to prefix the top level element ProjThesis, too. But if I do so my
Parser creates a error message?! Why is this valid? My Problem is that I
need a uniform design of my xml document, so every element should have
it's prefix to demonstrate it's origin.
 
Does anyone has any suggestions?
 
Best regards,
Nick
 
Received on Friday, 23 January 2004 19:33:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:41 GMT