[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] namespaces and types
Here's a wacky idea that came from an attendee at one of my presentations on namespaces. "So what are those prefixes for? Identifying types or something?" Okay, fine, I know it sounds crazy. But then I start wondering if maybe there's an interesting bit here, if one that doesn't go with the namespaces-as-vocabulary-identifiers flow. Think about: <myDocument xmlns="http://example.com" xmlns:ID="http://www.w3.org/TR/xmlschema-2/#ID" xmlns:IDREF="http://www.w3.org/TR/xmlschema-2/#IDREF" xmlns:int="http://www.w3.org/TR/xmlschema-2/#integer" xmlns:gYearMonth="http://www.w3.org/TR/xmlschema-2/#gYearMonth"> <para ID:id="thisPara">This paragraph references <bink IDREF:idref="thatPara">that paragraph</bink>.</para> <para ID:id="thatPara">This paragraph, on the other hand, contains two representations of temperatures for boiling water - <int:celsius>100</int:celsius>, and <int:fahrenheit>212</int:fahrenheit>, as well as a rough birthdate - <gYearMonth:birth>1924-10</gYearMonth:birth> - and a rough date of death - <gYearMonth:death>1954-12</gYearMonth:death>.</para> <para>Isn't abusing namespaces entertaining?</para> </myDocument> I'm not recommending this as good practice, but I think it at least qualifies as an interesting mental exercise. -- Simon St.Laurent "Every day, in every way, I'm getting better and better." - Emile Coue
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|