OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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