[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

namespaces and types


xmlns id
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.