[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Status of MicroXML?
Amy, Agreed. But I'm not sure that we're using the same language. Agreed. Based on this: My thinking here comes in module definitions - when I create an XQuery module, I am creating this module in its own distinct namespace:
module namespace bookstore = "com.mycompany.bookstore"; declare function bookstore:get-book($id as xs:string) as node(){...}; declare function bookstore:put-book($id as xs:string,$book as node()) as node(){...};
These are then referred to via their namespace prefix notation: import module namespace bookstore = "com.mycompany.bookstore" at "bookstore.xq"; let $book := bookstore:get-book("My Book")
It's this use of namespace (which actually isn't a binding on the XML at all) that most programmers would see as being familiar, at least within the context of C derived languages. This is what I'm referring to as an OOP-like usage (even though in reality it usually isn't).
Sorry - I was afraid that may be confusing. Library here refers to a library of functions (i.e., proto-classes), not a library of documents. Most OOP-trained programmers would not see "com.mycompany.bookstore" as being an authority, even though the XML community would argue that it is. They would see it as a package declaration.
Yup. This gets back to the questionable decision to make namespace declarations in XML share the same space as attributes. It may have ended up being preferable at one point to create a namespace declaration type:
<#com.mycompany.bookstore#> <bookstore>
<book> <title>My Book</title> <#com.mycompany.meta#> <systemId>12359</systemId>
</#com.mycompany.meta#> </book> </bookstore>
</#com.mycompany.bookstore#> or create resolved authority namespaces <com.mycompany.bookstore:bookstore>
<book> <title>My Book</title> <com.mycompany.meta:systemId>12359</systemId>
</book> </bookstore> Creating umbrella namespaces would have helped as well:
<?ns-use com.mycompany.bookstore com.mycompany.meta?> <bookstore> <book> <title>My Book</title> <systemId>12359</systemId>
</book> </bookstore> (where systemId is in the com.mycompany.meta namespace) I don't know - there are people far smarter than I on this list, but I think the central challenge is in recognizing that while namespaces are important from a domain standpoint, the current form of namespaces are creating impedence mismatches with the developers who have to work with them, especially outside of the context of XML-core tools.
Agreed.
As discussed before, XML is not OOP, and I'm not suggesting that namespaces should be utilized to identify an object class. I am saying that I think that most OOP developers tend to equate namespaces with packaging, and this is one of the reasons that there is such a disconnect between the XML and OOP communities in this regard. The XQuery module role of namespaces I think is where the correspondence is closest, but there's a fairly broad arena where namespaces have little to nothing to do with packaging. Communicating that to non-XML developers, however, is the challenge.
Kurt Cagle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|