Re: xml schemas and xml:* attributes

(The following is my personal opinion on the issue. It does not 
necessarily reflect the WG's view.)

I agree with what you said, but the short answer is "not easy".

First of all, schema should *not* treat *all* "xml:" attribute specially. 
xml: attributes are introduced and maintain by many groups and it is not 
up to the schema WG to say "all those attributes mean nothing in schema 
processing". For example, we can't always ignore "xml:id" because many 
people want it to behave as a schema ID.

If we agree that there shouldn't be "magic" in schema about xml: 
attributes, then to achieve what you need, some work needs to be done to 
allow the schema or application to say "I know which xml: attributes I may 
encounter and I know how to deal with them", and hopefully in an easier 
way than the current "add them everywhere in the schema".

If an application knows it may see xml: attributes but don't care about 
them, then it can use a schema processor that has a switch like "trim all 
xml: attributes before performing schema assessment". I don't know whether 
there's any processor that behaves in this way, but it's not something I'd 
encourage people to do. You may be ignoring some useful information, and 
it obviously has inter-op/portability issues.

Another possibility is to suggest the schema WG to add something like 
"default attribute wildcard" or "default attribute group" at the schema 
document level, which will be applied to all complex types defined in that 
schema document, unless otherwise overridden. I have mixed feelings about 
this. On the one hand, it helps users like you (make 1 change to <schema> 
instead of 38 to <complexType>s). On the other hand, it complicates schema 
for something that can be worked around (well, change your 38 complex 
types).

If this is important to you and you think a solution like the above (or 
better than it) would work, I suggest you open a Bugzilla report [1] for 
it. But I/we can't guarantee that this will be considered in the scope of 
schema 1.1, given our tight schedule.

[1] http://www.w3.org/Bugs/Public/enter_bug.cgi?product=XML%20Schema

Thanks,
Sandy Gao
XML Parser Development, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com


www-xml-schema-comments-request@w3.org wrote on 2007-02-03 08:48:42 PM:

> 
> 
> 
> 
> dear xml schema working group.
> 
> in an xml-centric processing environment, xml:* attributes can appear 
> in various locations in xml documents, sometimes because of authors 
> or authoring tools (xml:lang), sometimes because of xml technologies 
> (xinclude). it would be good if a schema could more easily 
> accommodate these attributes than be having to add them everywhere in 
> the schema.
> 
> whether this is something that will only address xml:* attributes, or 
> attributes in general (from any namespace) is something that i would 
> like to leave open for discussion, but it certainly would be useful 
> to have an easy way to plug together w3c xml technologies without 
> having to resort to rather cumbersome and brittle ways of specifying 
> things.
> 
> if possible, please cc me on replies, i am not on the mailing list.
> 
> thanks for your consideration and kind regards,
> 
> erik wilde   tel:+1-510-6432253 - fax:+1-510-6425814
>         dret@berkeley.edu  -  http://dret.net/netdret
>         UC Berkeley - School of Information (iSchool)
> 
> 

Received on Thursday, 8 February 2007 18:49:48 UTC