W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

RE: XSV Crash on XHTML Schema

From: Tom Gaven <tom.gaven@xmls.com>
Date: Thu, 8 Feb 2001 00:09:05 -0500
To: "'Eddie Robertsson'" <eddie@allette.com.au>
Cc: <xmlschema-dev@w3.org>
Message-ID: <000501c0918d$42705c10$6420183f@xmls>
   The documentation element can have any element(s) from any namespace as
children, as well as any subtree below that, due to processContents='lax'
shown below.  You would not have to escape the children of <documentation>
in order to be valid.


..snipped from the schema 4 schema:
<element id='documentation' name='documentation'
   <complexType mixed='true'>
      <sequence maxOccurs='unbounded' minOccurs='0'>
         <any processContents='lax'/>
      <attribute name='source' type='uriReference'/>
      <attribute ref='x:lang'/>

-----Original Message-----
From: Eddie Robertsson [mailto:eddie@allette.com.au]
Sent: Wednesday, February 07, 2001 11:05 PM
To: Sean B. Palmer
Cc: Henry S. Thompson; xmlschema-dev@w3.org; Rick Jelliffe
Subject: Re: XSV Crash on XHTML Schema

"Sean B. Palmer" wrote:

> Hi,
> I just created an XML Schema for a simple subset of XHTML m12n [1], but
> throws up a very strange error [2]. It keeps saying that "html.content"
> "html.attlist" are undefined, when they clearly are, and it doesn't help
> even if I change the group names being referenced.
> Also, XSV doesn't seem to notice the <undefined/> element in the test
> document [3], although that might be a consequence of it crashing out on
> me.

I had a look at the different schema documents involved and I found a couple
things that could cause your errors. The first thing I noticed (in xhtml.xsd
and some others) was that you have elements inside your <documentation>
element. I don't think you're allowed to have xml content within a
<documentation> element but you can solve it by using the escaped '<'. E.g.

   <div xmlns="http://www.w3.org/1999/xhtml">
   <h1>XHTML Simple 1.0 XML Schema</h1>

would become:

   &lt;div xmlns="http://www.w3.org/1999/xhtml">
   &lt;h1>XHTML Simple 1.0 XML Schema&lt;/h1>

I also noticed that you're using the "http://www.w3.org/1999/xhtml"
targetNamespace for all the schemas. Since you're using the
"http://www.w3.org/2000/10/XMLSchema" namespace as default namespace for all
schemas you need to qualify all your references to types and
elements/attributes you define with the "http://www.w3.org/1999/xhtml"
namespace. E.g. (in Common.xsd)

<attributeGroup name="Core">
   <attributeGroup ref="id"/>
   <attributeGroup ref="class"/>
   <attributeGroup ref="title"/>

should be:

<attributeGroup name="Core">
   <attributeGroup ref="xhtml:id"/>
   <attributeGroup ref="xhtml:class"/>
   <attributeGroup ref="xhtml:title"/>

where you have declared xhtml as xmlns:xhtml="http://www.w3.org/1999/xhtml"

In block.xsd you also have the following attributeGroup:

<attributeGroup name="pre.attlist">
   <attributeGroup ref="Common"/> (should be xhtml:Common)
   <attribute name="xml:space">
         <restriction base="xml:spaceX">
            <enumeration value="preserve"/>

I'm not sure what you're trying to do but it seems you're trying to restrict
the values of the xml:space attribute and I don't think you're allowed to do

> On another note (amatuer alert!), how you you denote the content model of
> an element (link, img etc.) as being empty? Simple question, I know... but
> I can't find the answer to it.

<xsd:element name="Empty">

Empty with an attribute:

<xsd:element name="Empty">
       <xsd:attribute name="EmptyAttr" type="string"/>

Hope this helps

> [1] http://infomesh.net/2001/xhtmls/xhtml.xsd
>  - XHTML Simple 1.0, Sean B. Palmer (based on Rick Jelliffe's
>    work (and some of my own earlier stuff)).
> [2]
> 2001%2Fxhtmls%2Ftest.html&warnings=on&keepGoing=on&logOK=on&style=msxsl
> [3] http://infomesh.net/2001/xhtmls/test.html
> --
> Kindest Regards,
> Sean B. Palmer
> @prefix : <http://webns.net/roughterms/> .
> [ :name "Sean B. Palmer" ] :hasHomepage <http://infomesh.net/sbp/> .
Received on Thursday, 8 February 2001 00:09:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:50 UTC