- From: Dave Pawson <dave.pawson@gmail.com>
- Date: Wed, 20 Mar 2013 14:06:33 +0000
- To: XMLSchema-dev <xmlschema-dev@w3.org>
Note I'm the real newbie here Mike.
On 20 March 2013 13:53, Michael Kay <mike@saxonica.com> wrote:
> A complex-type-with-simple-content is generally defined by extension: think
> of it as first defining the simple content of the element, then extending it
> to allow attributes.
>
> You can define a c-t-with-s-c as a restriction of another c-t-with-s-c, but
> that doesn't seem to be what you are doing here; the suggestion from the
> error message is that dc:SimpleLiteral is a simple type, not a c-t-with-s-c.
>
> Difficult to correct this without knowing what you are trying to achieve.
> Why are you saying xml:lang is prohibited? Does your new type allow any
> attributes, and if so, which? What is the definition of dc:SimpleLiteral?
I'm trying to understand this schema, then reduce it.
Defn:
<xs:complexType name="SimpleLiteral" mixed="true">
<xs:annotation>
<xs:documentation xml:lang="en">
This is the default type for all of the DC elements.
It permits text content only with optional
xml:lang attribute.
Text is allowed because mixed="true", but sub-elements
are disallowed because minOccurs="0" and maxOccurs="0"
are on the xs:any tag.
This complexType allows for restriction or extension permitting
child elements.
</xs:documentation>
</xs:annotation>
<xs:complexContent mixed="true">
<xs:restriction base="xs:anyType">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
</xs:sequence>
<xs:attribute ref="xml:lang" use="optional"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
Is that any help?
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
Received on Wednesday, 20 March 2013 14:07:19 UTC