Re: am i cracy?

Hi Nick,

Checked your document against Xerces 2.6.0:
E cvc-elt.1: Cannot find the declaration of element 'ProjThesis'.

This is caused not only because you specify the ProjThesis as belonging to no namespace but also because your schemaLocation value does not specify correctly the namespace for your ProjThesis.xsd schema, you have http://www.iese.fhg.de instead of http://www.iese.fhg.de/Publication/ProjThesis. Correcting this should get you further I guess.

Next error:
E cvc-complex-type.3.2.2: Attribute 'xmlns.iese.ProjThesis' is not allowed to appear in element 'ProjThesis'.

This seems a spelling error, you probably wanted xmlns:iese.ProjThesis.

Next errors:
E cvc-complex-type.3.2.2: Attribute 'xlink:type' is not allowed to appear in element 'iese.Publication:author'.
E cvc-complex-type.3.2.2: Attribute 'xlink:show' is not allowed to appear in element 'iese.Publication:author'.
E cvc-complex-type.3.2.2: Attribute 'xlink:href' is not allowed to appear in element 'iese.Publication:author'.

These appear because the default value for anyAttribute/@processContents is "strict" thus the definition for those attributes must be present. Specifying processContents as "lax" or "skip" will remove these last errors:

            <xs:element name="author" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:anyAttribute namespace="http://www.w3.org/1999/xlink" processContents="lax"/>
                </xs:complexType>
            </xs:element>

Hope that helps,
 George
-------------------------------------------------------
George Cristian Bina mailto:george@oxygenxml.com
<oXygen/> XML Editor - http://www.oxygenxml.com/

  ----- Original Message ----- 
  From: Nikolas Nehmer 
  To: xmlschema-dev@w3.org 
  Sent: Saturday, January 24, 2004 2:32 AM
  Subject: am i cracy?


  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:location>

         <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 Saturday, 24 January 2004 00:49:45 UTC