xsl-list
[Top] [All Lists]

Re: mixing it up: REST+XML Namespaces + XLST

2005-04-19 03:20:01
David Carlisle wrote:

in general looking up namespace uris for anything is evil evil evil,
 

to me something should

however if you must do it (and sometimes it does seem an attractive
idea) I strongly suggest that you put a rddl document at the namespace
uri an use that to cross reference to your application data.
That costs you something in following the indirection but you gain a lot
in not forever blocking other uses of the namespace URI by having your
application data sat there.
 


'blocking other uses'...like what?
which is why my question....does anyone use a namespace URI for anything
other then identification?

I want to hard wire my xml namespace to a physical location...perhaps
others dont want to...

in a development vs production scenario, both dev/production XML
instance always returns the 'production' XML Namespace..to turn on
'development' I just pass an xsl:param which signals an XSLT preprocess
to remap namespace to dev instances...easy in XSLT 2.0. Dealing with
versioning is easy as its either a new HTTP URI if the XML changes
schema or not.

A RDDL document is essentialy an XHTML document so if you go to the
namespace uri in a web browser you get a human readable discription but
with extra elements in the rddl namespace that allow references to
schemas stylesheets and anything else of intereset. At least some schema
validators (xsv for example) will correctly parse a rddl file and locate
an xsd schema, if it happens to come accross one while following the
"hints" on where to find a schema document.
 


I have used RDDL since its inception and have found it to be a good
thing...though its an extra layer of abstraction with respect to machine
processing; REST means I dont need a formal seperate description of my
web services interface (which needs to be kept in sync).

to put things simply I use XML namespaces to avoid collision as I have
many different xml feeding into large composite documents; I identify
these namespaces using HTTP URI, if I also use HTTP URI to identify REST
services it makes life simple in XSLT to keep em the same.

(isn't this more of an xml-dev thread than xsl-list)
 


yes, which is why I wont go on... though I will ask again if anyone else
is brave enough to use HTTP URI in their XML Namespaces for anything else?

cheers, Jim




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--