[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Long Namespaces

Subject: Re: Long Namespaces
From: "Abel Braaksma (online)" <abel.online@xxxxxxxxx>
Date: Fri, 8 Jun 2007 00:17:17 +0200 (CEST)
Re:  Long Namespaces
I cannot help but think that the original poster may have the
problem at work that people are thinking of namespace prefixes as
namespaces. Hence that they rather like _long_ prefixes, as he said.

I remember having a similar situation where a part of a SOAP
implementation was wrongly build upon matching prefixes, instead of
matching namespaces. Which quickly resulted in both confusion,
collision of names, and, of course, incorrect use of namespaces.

If your co-workers have this 4imagination4 problem about namespaces
and placeholders for namespaces (the prefixes) I suggest they should
read up on it a little. It is an XML issue, not XSLT, and for
understanding XSLT well it is good to know a bit about namespaces

That said, on the general issue, I would like to second the opinions
expressed here about short prefixes. In addition, I often find that
different people in the same environment have different styles and
hence use different prefixes.

If that is inconvenient, one could define the prefixes inside a DTD.
I cannot really recommend this, but it saves some arguing inside a
company or between co-workers about what prefixes to use and
documents will tend to look more equal. As a result, the root
element (or whatever element contains the namespace declarations)
will look rather empty (the defs being inside the DTD). O

Of course, this is all a matter of taste. Choosing prefixes does not
change the content of the XML, it is purely esthetical.

-- Abel Braaksma

PS: for some reason we use xsl-fo: instead of fo:... ;)

>>  It seems that 3 letter namespace [prefix]s are the norm.
> not really, firstly of course the prefixes are arbitrary, and
> secondly
> I suspect the empty prefix default namespace is most common.
> But of the namespace prefixes that get used dconventionally I see
> all
> sorts of lengths
> of the ones I can think of off the top of my head:
> xsl    for xslt namesace
> xs     for xsd schmema namespace
> xsd    for xsd schmema namespace
> fn     for xpath/xquery function namespace
> saxon  for saxon6 extension namespace 9as in saxon:node-set()
> exslt: for (one of)the exslt namespaces exslt:node-set()
> msxsl  for msxsl extension namepsace msxsl:node-set()
> ""     for xhtml which  is usually unprefixed but if prefixed is
> often one of
> xhtml  for xhtml 1 namespace
> h      for xhtml 1 namece
> fo     for XSL FO namespace
> that's lengths  0 1 2 5, and of the two that are of length 3 I never
> use
> xsd as I (almost) always use xs: for XSD types like xs:string etc,
> so
> that leaves xsl: as the only three letter namespace prefix that
> comes to
> mind.
> David
> ________________________________________________________________________
> The Numerical Algorithms Group Ltd is a company registered in
> England
> and Wales with company number 1249803. The registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
> This e-mail has been scanned for all viruses by Star. The service is
> powered by MessageLabs.
> ________________________________________________________________________

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.