|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: Namespace use cases
One of the facets that I've often wondered about with namespaces is the degree to which protocols should enter into the URI. For instance, I recently wrote an article (that will get reposted once XMLToday.org is back online - waiting for a check to come in to pay my ISP for the next few months) looking at developing modules in XQuery. In that context, I percieved that you could in fact use a Java like construct (as is frequently done when declaring Java classes within XSLT or XQuery) but with the protocol changed to xquery: declare namespace stats = "xquery:org.xmltoday.xqlib.statistics"; declare function stats:average($numseq as xs:double*) as xs:double {...}; It makes no real difference to the processor, of course, but from an organizational standpoint it opens up a number of possibilities. For instance, a specific module of financial statistics functions might exist within a separate but related namespace declare namespace finstats = "xquery:org.xmltoday.xqlib.statistics.finance"; The other advantage to this approach is that it makes it easier for Java-like preprocessors to import multiple namespaces that have preferred prefixes within the context of a given system. <?import "xquery:org.xmltoday.xqlib.statistics.*"?> It may also allow for creating umbrella bindings in other contexts: <?bind "xquery:org.xmltoday.xqlib.statistics.*" as="st"?> so that both statistics and financial statistics functions would be referenceable via the st: namespace, even though they are technically in different namespaces. May be apropos of nothing, just random thoughts firing. Kurt Cagle Managing Editor http://xmlToday.org On Sun, Jul 19, 2009 at 6:54 PM, Micah Dubinko <Micah.Dubinko@marklogic.com> wrote: Another question on this thread:
[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
|
|||||||||

Cart








