Re: HELP: Need At-Least-One model, and CDATA element type

I believe that Henry is suggesting ((a, b?) | (b, a?)) where you have ((a,
b?) | (a?, b)).
If I see an 'a' with yours, I don't know which particle to attribute it to,
with his I do know.
Henry's still accepts instances of (a,b), (a), (b), but also accepts (b,a).

I would think that you could also do ((a, b?) | (b)).
I think that this should satisfy the Unique Attribution Constraint, and
accept exactly the instances that you did.

Morris


Brian Atkins <brian_atkins@firehunter.com>@w3.org on 09/07/2001 12:13:52 PM

Sent by:  xmlschema-dev-request@w3.org


To:   xmlschema-dev@w3.org
cc:
Subject:  Re: HELP: Need At-Least-One model, and CDATA element type



Thanks for the quick response.

As far as I can tell, the schema fragment I posted below IS the
schema equivalent of ((a, b?) | (b, a?)).  I even tested this
by using dtd2xs to translate the above statement into schema
elements, and it produced the same thing.  They still fail the
Unique Particle Attribution test, however.

For #2 below, you got it.  I want a content model which will cause
it's contents to be completely ignored by the parser, including
any and all markup.  For example, the contents of the element
I'm trying to define may be HTML.  I won't know what the content
is, I know I just want to pass it on with out touching or parsing
it in any way.  The <any/> particle doesn't do this, as the contents
of this is "any well-formed XML", according to the Schema Primer.
This is born out by the 1.4.1 Xerces SAX parser, which tries to
process the HTML tags in the ANY element.

> Re: HELP: Need At-Least-One model, and CDATA element type
>
> From: Henry S. Thompson (ht@cogsci.ed.ac.uk)
> Date: Fri, Sep 07 2001
>
> *Next message: Henry S. Thompson: "First Release of the W3C XML Schema
Test Collection"
>
>    * Previous message: Brian Atkins: "HELP: Need At-Least-One model, and
CDATA element type"
>    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>    * Other mail archives: [this mailing list] [other W3C mailing lists]
>    * Mail actions: [ respond to this message ] [ mail a new topic ]
>
>
----------------------------------------------------------------------------------------------------

>
> To: Brian Atkins <brian_atkins@firehunter.com>
> Cc: freedom@vectorsw.com, xmlschema-dev@w3.org
> From: ht@cogsci.ed.ac.uk (Henry S. Thompson)
> Date: 07 Sep 2001 10:17:14 +0100
> Message-ID: <f5bbsknfjhh.fsf@cogsci.ed.ac.uk>
> Subject: Re: HELP: Need At-Least-One model, and CDATA element type
>
> Brian Atkins <brian_atkins@firehunter.com> writes:
>
> > Sorry if this is already answered, but I spent several hours and
> > couldn't find an answer in the archives or documents.
>
> > Question 1: I want to create a model such that I can have either one
> > or both of a set of elements, but not none.  The following model
> > describes my desired result:
> >
> >     <xs:choice>
> >       <xs:sequence>
> >         <xs:element name="StartTime" type="xs:dateTime"/>
> >         <xs:element name="StopTime" type="xs:dateTime" minOccurs="0"/>
> >       </xs:sequence>
> >       <xs:sequence>
> >         <xs:element name="StartTime" type="xs:dateTime" minOccurs="0"/>
> >         <xs:element name="StopTime" type="xs:dateTime"/>
> >       </xs:sequence>
> >     </xs:choice>
>
> Use the Schema equivalent of ((a, b?) | (b, a?)).
>
> > Question 2: How do I get a CDATA like type for an element?  What I
> > want is to encapsulate a document as payload in an element in an
> > outer document, and have it be completely opaque.  If the payload
> > document happens to be HTML, XML, or anything else, I don't care and
> > don't want parsers or processors to touch it.  It's just a blob of
> > element content. For the life of me, I can't figure this out.  Any
> > help, pointers?
>
> Not clear what you really want here -- do you mean SGML's CDATA?
>
> To treat markup as data, use a CDATA marked section, i.e.
>
> <![CDATA[...]]>
>
> To tell the schema processor to ignore markup, use the <any/> particle
> in your content model.
>
> ht
> --
>   Henry S. Thompson, HCRC Language Technology Group, University of
Edinburgh
>           W3C Fellow 1999--2001, part-time member of W3C Team
>      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
>             Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
>                      URL: http://www.ltg.ed.ac.uk/~ht/
>
>
----------------------------------------------------------------------------------------------------

>
>    * Next message: Henry S. Thompson: "First Release of the W3C XML
Schema Test Collection"
>    * Previous message: Brian Atkins: "HELP: Need At-Least-One model, and
CDATA element type"
>    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>    * Other mail archives: [this mailing list] [other W3C mailing lists]
>    * Mail actions: [ respond to this message ] [ mail a new topic ]

--
Brian Atkins          brian_atkins@firehunter.com         (970) 288-2114
Agilent Technologies     4800 Wheaton Drive        Ft. Collins, CO 80525

Received on Monday, 10 September 2001 10:54:12 UTC