|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
aliasing elementsIs there any way to alias an element or attribute from another namespace? This immediate spur of this question is that the XHTML 2.0 draft is struggling with xml:id http://www.w3.org/TR/xhtml2/mod-core.html#col_Core At the moment, it defines both id and xml:id, but says not to use them on the same element. I believe what they really want is to say is closer to: xml:id is a core attribute. id is just an alias for xml:id. It is not merely similar, or a second copy; it is the same attribute, so only one of the two names can be used on any given element. I believe that xml:lang and xml:base are similar, and there is a chance that aliasing could help resolve some of the problems with xlink. -jJ |
|
|
|
|
|
Re: aliasing elementsOn 16 Aug 2006, at 12:38 , Jim Jewett wrote: > > Is there any way to alias an element or attribute from another > namespace? Alas, not in the current state of the art. The idea has been kicked around, though, and it has seemed to some people that it would be convenient. If it's something you would like to see in some future version of XML Schema, now would be a good time to say so. -C. M. Sperberg-McQueen |
|
|
Re: aliasing elementsOn 8/16/06, G. Ken Holman <gkholman@...> wrote: > > At 2006-08-16 14:38 -0400, Jim Jewett wrote: > >Is there any way to alias an element or attribute from another namespace? ... > >I believe that xml:lang and xml:base are similar, > I don't see how. These two (along with id) are often the only attributes which have a mandatory external namespace. When specifying valid attributes, it is ugly and awkward to say that one has a colon in the middle of its name. But not using the external namespace can lead to compatibility problems. (This is probably worst with id, because of the role of id, but it is always awkward.) -jJ |
|
|
Re: aliasing elementsAt 3:00 PM -0600 8/16/06, C. M. Sperberg-McQueen wrote: >On 16 Aug 2006, at 12:38 , Jim Jewett wrote: > >> >>Is there any way to alias an element or attribute from another namespace? > >Alas, not in the current state of the art. [I speak as a fool.] 1. Machinable metadata in the schema One, relatively indirect approach that we in the Protocols and Formats Working Group have kicked around [1] as a possible approach to documenting a compare-and-contrast with prior art [2] is to use machinable metadata embedded in the xsd:appinfo in the schema. Related to this is a debate (the jury still out so far as I know) as to whether SKOS terms [3] are appropriate to apply to markup-language concepts such as that represented in syntax by xml:id or xml:base. But if one wanted to put a vanilla 'id' attribute in their own namespace, could they, in RDF in xsd:appinfo, assert their intent that it be processed the same as xml:id and that its values could not overlap the values of the latter attribute in the appropriate scope? [1] http://lists.w3.org/Archives/Public/wai-xtech/2005Oct/0010.html [2] http://www.w3.org/TR/xag#cp4_5 [3] http://www.w3.org/TR/swbp-skos-core-guide/ 2. Derivation As I say, I am a fan of schemas, not an expert. I thought that data structures are developed in two steps. First the structure is defined, and then bound to syntax. Is this just for structures? Or is the two-phase creation of typed syntax global? Can a new XML dialect import from a foreign schema at the type-definition layer and bind to new and different syntax? Does this fail in the case of xml:id because the compromise struck over xml:id [4] does not depend on schemata? [4] http://www.w3.org/TR/xml-id/ 3. Type sharing Actually, for xml:id I don't see the problem. A dialect can declare an attribute, whether named 'id' or anything else, to be of _type_ ID and it is automatically a renames in that syntax of xml:id; so long as the dialect supports the xml:id Rec at all. Because the uniqueness rules are for "all values of attributes of type ID" and not "all values of like-named attributes of type ID." This, of course, makes "type=ID" a class, not a type, but it's what we need. So I need another example, or an explanation of why that explanation does not apply. Al PS: I speak as a fool... > >The idea has been kicked around, though, and it has seemed to >some people that it would be convenient. If it's something you >would like to see in some future version of XML Schema, now would >be a good time to say so. > >-C. M. Sperberg-McQueen |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |