xsl-list
[Top] [All Lists]

Re: [xsl] Long Namespaces

2007-06-07 11:45:37
I would rather have longer and more descripitve element and attributes
then namespace prefixes.....saves on keystrokes having something
shorter and you will reduce verbosity of a document if you avoid
longer then 3-4 character namespace prefixes.

As Joe said, it doesn't matter as these prefixes only have relevance
in that particular document...that being said, people tend to use the
same prefix.

If you have a deep inheritence hierarchy you might find having a long
descriptive prefix in the master document useful......though even then
I would advise that this type of question is typically answered by how
you generate the XML in question (e.g. using an editor, manual, or is
it the output of some process).

gl, Jim Fuller

On 6/7/07, Karl Stubsjoen <kstubs(_at_)gmail(_dot_)com> wrote:
Ok, so I messed up that post ; )
I meant to ask about verbose prefixes!  So an example:

xmlns:myVerbosePrefix = "http://mydomain.com/verboseprefixes";

Anyone going that route?  Reason I ask, is here at work, my colleagues
are not so familiar with XSLT.  They did not like 3 letter prefixes,
said it was confusing.

Karl..

On 6/7/07, Joe Fawcett <joefawcett(_at_)hotmail(_dot_)com> wrote:
> ----- Original Message -----
> From: "Karl Stubsjoen" <kstubs(_at_)gmail(_dot_)com>
> To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
> Sent: Thursday, June 07, 2007 6:58 PM
> Subject: [xsl] Long Namespaces
>
>
> > Is there any creed that suggests that namespace decelerations are
> > either bad or shunned upon?  It seems that 3 letter namespaces are the
> > norm.  Is anyone using verbose namespace declarations regularly?
> >
> > Karl..
> >
> > --~------------------------------------------------------------------
> > 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>
> > --~--
> >
> >
> I presume you mean "declarations" :)
>
> You appear to be confusing the namespace URI or name with its prefix. The
> idea is that namespace URIs are globally unique, they are often similar to
> URLs because that way you can use your domain and assure uniqueness,
> although there's nothing to stop you creating a namespace such as
> http://www.microsoft.com if you wish, it's a "gentlemen's agreement".
> The prefix is a way to save writing the long URI and just holds for the
> lifetime of the document, maybe even less than that if you re-define the
> prefix mappings. So you can say that "ns" actually represents
> http:///www.myDomain.com/namespaces/myNamespace and use that prefix in a
> number of situations, e.g.. in an XPath expression. You often this mapping
> with xmlns:ns="http:///www.myDomain.com/namespaces/myNamespace"; but this
> only holds until the URI is mapped to a different prefix or the process
> finishes. So in an XML document you could map "ns1" to the URI whereas in an
> XSLT you use to transform it you could map to "ns2" instead.
>
>
> Joe
> http://joe.fawcett.name
>
>
> --~------------------------------------------------------------------
> 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>
> --~--
>
>

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



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

<Prev in Thread] Current Thread [Next in Thread>