|
Here's an idea....
According to the spec (1) XML namespaces can (and do) associate attribute names with URI references.
Well, I noticed that the URI doesn't have to be a URL to an external document (2). This is different from pointing to a relative namespace, which is depreciated (3); in this case I'm thinking about pointing into the document itself. This would be accomplished using an absolute XPointer child sequence, as in:
<?xml version="1.0"?>
<root xmlns:id1="/1/1/3"
xmlns:id2="/1/2/1">
<child1>
<child11>...</child11>
<child12>...</child12>
<child13 id1:uri="/1/1/3">...</child13>
</child1>
<child2>
<child21 id2:uri="/1/2/1">...</child21>
<child22>...</child22>
</child2>
</root>
I really don't think this is a good way of describing ids. However, it's just a thought that may spur better ideas. :)
---
Jimmy Cerra
jc2astro@hotmail.com
"If the path is set in stone, use a sledgehammer."
---
Disclaimer: I'm not saying it's a good idea! I'm just asking what you think. :)
---
notes:
---
1) From the abstract of (http://www.w3.org/TR/REC-xml-names/): "XML namespaces provide a simple method for qualifying element and attribute names used in Extensible Markup Language documents by associating them with namespaces identified by URI references."
---
2) The namespace's URI doesn't even have to physically point to somewhere at all (although it should). See this: http://www.rpbourret.com/xml/NamespacesFAQ.htm#q12_4
---
3) See: http://www.rpbourret.com/xml/NamespacesFAQ.htm#q12_5
|