xsl-list
[Top] [All Lists]

Re: [xsl] Namespaces best practice in XML

2006-04-04 07:36:11
On 4/4/06, tom tom <tomxsllist(_at_)hotmail(_dot_)com> wrote:
Thats what I figured. The reason I ask is that I need this stylesheet to be
as accessible to as many people as possible. Having to prefix all source XML
elements in the XSLT when that prefix doesn't physically exist in the XML
adds a level of complexity that non-namespace-savvy developers might find
confusing.

True, but everyone has to learn sometime :).


I guess my alternatives are to remove the namespace declaration from the
source XML, use a version of HTML which doesn't require a namespace
declaration or just deal with namespaces!

I've removed the namespace from the source documents in the past when
dealing with similar situations.  Of course, in all of these
sitautions I was usually involved in some way with a classroom
situation where I had non-techie classmates.  (One of the perks of
getting an library degree). It's not the best though since at some
point they will have to deal with it if they want to do some complex
(read cool) applications with xml/xslt.  (And once dealt with it's
pretty painless).

Honestly though, if it's other developers, once they know the basics
of XML I can't imagine namespaces taking that long to wrap their heads
around.  (Playing with xhtml and svg might be the way to go for some
quick examples.)

Jon Gorman

--~------------------------------------------------------------------
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>
--~--