W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2009

Use of non-schema namespaced attributes on appinfo

From: Jeff Young <jey@adobe.com>
Date: Tue, 13 Jan 2009 14:01:33 +0000
Message-Id: <D7A2241B-5F29-4538-BA4F-F93EC18763DC@adobe.com>
To: "www-xml-schema-comments@w3.org" <www-xml-schema-comments@w3.org>
I have an application-specific attribute that I need to store on a  
schema component.  The XMLSchema spec states that non-schema  
namespaced attributes are allowed on the <appinfo> tag, but several  
books on the subject suggest that this isn’t the case.

So, for the case where I want to store foo:myAttr on a schema  
component, should I use:

    <xs:annotation>
       <xs:appinfo xmlns:foo=”http://whatever” foo:myAttr=”someValue”/>
    </xs:annotation>

or the more verbose:

    <xs:annotation>
       <xs:appinfo>
          <foo:myHolder xmlns:foo=”http://whatever” myAttr=”someValue”/>
       </xs:appinfo>
    </xs:annotation>

I prefer the former (which doesn’t require the somewhat artificial  
construction of a holder element), but I’d rather do the latter if it  
represents the intended (or universally practiced) usage.

Thanks,
-- Jeff Young
Adobe Systems, Inc
  
Received on Wednesday, 14 January 2009 17:47:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:09 UTC