XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Is JSON Schema simpler than XML Schema?

Hi Pete,

> a colleague and I are working on an alternative
> to JSON Schema called JSON Content Rules (JCR)

Neat!

How is the following XML Schema complexType expressed using JCR? Note that the complexType specifies mixed content.

<xs:complexType name="InternationalString" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="bdo" type="bdoType" />
        <xs:element name="bdi" type="bdiType" />
    </xs:choice>
    <xs:attribute name="direction" type="directionType" />
</xs:complexType>

Next, suppose the above complexType is extended (derive-by-extension) with an attribute, as shown below. How is this second complexType expressed in JCR?

<xs:complexType name="PedigreeStringType">
    <xs:complexContent mixed="true">
        <xs:extension base="InternationalString">
            <xs:attribute name="pedigree" type="xs:string" />
        </xs:extension>
    </xs:complexContent>
</xs:complexType>

/Roger
 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS