← Prev in month ← Prev in thread

anyAttribute

From
Brad Harper <>
To
xml-dev <>
Date
2007-05-02T21:14:34Z
ID
<H000020901502a58.1178140473.carbon.epsiia.com@MHS>
Thread
anyAttribute
Hello:

Per http://www.w3.org/2001/XMLSchema.xsd, it appears that <anyAttribute> 
is valid for most parts of the schema.

I've created a schema for an application of XML; I'd like to refer to my 
own special-use attribute directly within my schema, rather than define 
the attribute to be a child of an element defined by the schema. That 
is, in the .xsd

   <element name="E" classifier="blah" ...>

rather than

   <element name="E" ...>
     <complexType>
       ...
       <attribute name="classifier" ...>

Doing so allows the attribute to appear in the .xsd where it makes more 
sense for the application, rather than in an instance document.

My validator tool is complaining; I've tried introducing this attribute 
at various locations in the schema, including <complexType> and 
<element>.

Have I mis-interpreted the schema schema?

Thanks.

Brad
← Prev in month ← Prev in thread