W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2000

Re: help! can't get attribute mix-in to work

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 04 May 2000 08:56:20 +0100
To: Dan Connolly <connolly@w3.org>
Cc: xmlschema-dev@w3.org
Message-ID: <f5b4s8e3g0r.fsf@cogsci.ed.ac.uk>
Dan Connolly <connolly@w3.org> writes:

Oops, sorry for previous empty reply.

> I'm trying to mix in smil animation attributes using
> anyAttribute processContents=strict on an HTML P element,
> but I'm losing; this looks right:
> 
> Validation warning: in unnamed entity at line 15 char 1 of
> http://slow1.w3.org/XML/2000/04schema-hacking/h+s.html:
> allowing {http://www.w3.org/2000/TR/smil-animation10}:begin because it
> matched wildcard(##other)
> 
> but I don't see why it's not finding my declaration of t:begin:
> 
> Validation error: in unnamed entity at line 15 char 1 of
> http://slow1.w3.org/XML/2000/04schema-hacking/h+s.html:
>  can't find a type for wildcard-matching attribute
> {http://www.w3.org/2000/TR/smil-animation10}:begin

Because there is no top-level attribute declaration for 'begin' in
that schema.

Attribute declarations in attribute groups are not 'top-level',
because they're not guaranteed to be unique.

If I change the relevant part of your schema to read:

  <attribute name="begin" type="string"/>

  <attributeGroup name="timingAttrs">
   <attribute ref="begin" use="optional"/>
   <attribute name="dur" type="string" use="optional"/>
   <attribute name="end" type="string" use="optional"/>
   <attribute name="restart" use="default" value="always">
    <simpleType base="string">
     <enumeration value="always"/>
     <enumeration value="never"/>
     <enumeration value="whenNotActive"/>
    </simpleType>
   </attribute>
   <attribute name="repeatCount" type="string" use="optional"/>
   <attribute name="repeatDur" type="string" use="optional"/>
   <attribute name="fill" use="default" value="remove">
    <simpleType base="string">
     <enumeration value="remove"/>
     <enumeration value="freeze"/>
    </simpleType>
   </attribute>
 </attributeGroup>

it works fine.  (Now that I fixed a typo in the opportunistic
attribute validation code, that is :-)

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/
Received on Thursday, 4 May 2000 03:56:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:17 GMT