W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

RE: Schema for XSLT (concerns mixed content, content attribute)

From: <Noah_Mendelsohn@lotus.com>
Date: Thu, 20 Apr 2000 01:11:45 -0400
To: "Box, Don" <dbox@develop.com>
Cc: Curt.Arnold@hyprotech.com, dbox@develop.com, www-xml-schema-comments@w3.org, xml-dev@xml.org, xml-dev-temp@egroups.com
Message-ID: <OFE42BCDE2.DE64911C-ON852568C6.0073C555@lotus.com>
Schemas treats "mixed" differently than DTD's.  In schemas, both 
element-only and mixed take a full content model.  The only difference 
with mixed is that the instance can have character information item 
children before after and in between the elements validated by the model. 
So, you have the full power of content models with mixed.  Also, mixed 
does not imply any defaults for min/maxOccurs.  This is NOT the DTD model, 
but it can express every constraint allowed by DTD mixed (and more).

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------







"Box, Don" <dbox@develop.com>
Sent by: www-xml-schema-comments-request@w3.org
04/18/00 06:21 PM

 
        To:     "'Arnold, Curt'" <Curt.Arnold@hyprotech.com>, "'xml-dev@xml.org'" 
<xml-dev@xml.org>
        cc:     "Box, Don" <dbox@develop.com>, "'www-xml-schema-comments@w3.org'" 
<www-xml-schema-comments@w3.org>, "'xml-dev-temp@egroups.com'" 
<xml-dev-temp@egroups.com>, (bcc: Noah Mendelsohn/CAM/Lotus)
        Subject:        RE: Schema for XSLT (concerns mixed content, content attribute)

> -----Original Message-----
> From: Arnold, Curt [mailto:Curt.Arnold@hyprotech.com]
> Sent: Tuesday, April 18, 2000 2:01 PM
> To: 'xml-dev@xml.org'
> Cc: 'dbox@develop.com'; 'www-xml-schema-comments@w3.org';
> 'xml-dev-temp@egroups.com'
> Subject: RE: Schema for XSLT (concerns mixed content, content 
> attribute)
> 
> 
> First, a few comments on Don's schema for XSLT then a 
> discussion about some problems representing XSLT's content 
> model with schema.
> 
> The derivedBy attribute was not specified on the definition 
> of the copy and message complex types as appears to be 
> required by Schema representation constraint 1.1

Thanks. I thought I caught all of those. It's now fixed.

> The param element reference in the named-template type 
> definition should have a minOccur="0" and a 
> maxOccur="unbounded".  As written, a template has to have one 
> and only one param.

My reading of rule 4.3 under the {content type} definition (found under
section 4.3.3) implies that there is an implicit <choice minOccurs='0'
maxOccurs='unbounded' > particle over the particle children of a
content=mixed complex type.  I'll defer to Henry on this. 

> You frequently use type-scoped element definitions.  I try to 
> avoid these unless a specific tag-name has a distinct content 
> models in different contexts since it will be difficult if 
> not impossible to
> generate an equivalent DTD.

Local element and attribute declarations are one of the more powerful
features of the schema language. I make no apologies for using them. 
Believe
me, the WG struggled long and hard to get them to where they are now. The
least we can do as a community is use them ;-)

> Second, Schema doesn't seem to have the ability to adequately 
> represent the content model of <xsl:template> or 
> <xsl:for-each>.  <xsl:template> content should be zero or 
> more <xsl:param> elements
> followed by template content. 

Yeah, I thought about alternative ways to model that. One way would have
been to use a named model group (that was my first pass btw). The problem 
is
that for mixed content, you can't use sequence constraints. This is a
problem with older technologies as well.

> <xsl:for-each> content should 
> be zero or more <xsl:sort> elements followed by template content.

Same problem.

> [snip]

I don't know that anyone has the will to add MORE complexity to the schema
language to handle mixed content. 

DB
http://www.develop.com/dbox
Received on Thursday, 20 April 2000 01:16:23 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:52 UTC