XSLT namespace question

Discussion in 'XML' started by Mikko Nummelin, Nov 20, 2003.

  1. As the XSLT namespace is declared to be used in XSL documents like this:

    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    , isn't this a risky practice as it refers to an external web site and if
    that web site is down at a particular time or is moved to another place,
    then even large web sites referring to it may fall down with it. So, is it
    possible to obtain a local copy of such a namespace and refer to it in
    further applications as

    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://localhost/XSL/Transform">

    or in a similar way? Which files are important and where to obtain them?


    Mikko Nummelin
     
    Mikko Nummelin, Nov 20, 2003
    #1
    1. Advertising

  2. Mikko Nummelin

    Keith Davies Guest

    On Thu, 20 Nov 2003 22:19:37 +0200, Mikko Nummelin
    <> wrote:
    > As the XSLT namespace is declared to be used in XSL documents like this:
    >
    ><xsl:stylesheet version="1.0"
    > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    >
    > , isn't this a risky practice as it refers to an external web site and
    > if that web site is down at a particular time or is moved to another
    > place, then even large web sites referring to it may fall down with
    > it. So, is it possible to obtain a local copy of such a namespace and
    > refer to it in further applications as


    the string attached to a namespace definition is just that -- an
    arbitrary string. The engine doesn't download anything from a URI that
    may be in that string. If w3 deletes that directory it will have *no*
    effect on your processing.

    It is customary to base the namespace key on the web site of the
    creator, and to have documentation on the components of the namespace at
    that location, but it is not required.

    When processing XML data in a program, most (I can't say all) libraries
    will provide things in the form of (name,namespace). What your program
    will see is actually something more like ('template',
    'http://www.w3.org/1999/XSL/Transform') than 'xsl:template'. If it
    isn't in the namespace identified by that URI, an XSLT engine won't
    recognize the element as being XSLT.

    ><xsl:stylesheet version="1.0"
    > xmlns:xsl="http://localhost/XSL/Transform">
    >
    > or in a similar way? Which files are important and where to obtain
    > them?


    there are no files to obtain. A namespace is little more than a
    qualifier used to correctly identify an XML component.


    Keith
    --
    Keith Davies "Your ability to bang your head against
    reality in the hope that reality will
    crack first is impressive, but futile"
    -- Geoffrey Brent, rec.games.frp.dnd
     
    Keith Davies, Nov 20, 2003
    #2
    1. Advertising

  3. On Thu, 20 Nov 2003, Keith Davies wrote:

    > On Thu, 20 Nov 2003 22:19:37 +0200, Mikko Nummelin


    >> As the XSLT namespace is declared to be used in XSL documents like this:
    >>
    >> <xsl:stylesheet version="1.0"
    >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    >>
    >> , isn't this a risky practice as it refers to an external web site and
    >> if that web site is down at a particular time or is moved to another
    >> place, then even large web sites referring to it may fall down with
    >> it. So, is it possible to obtain a local copy of such a namespace and
    >> refer to it in further applications as


    > the string attached to a namespace definition is just that -- an
    > arbitrary string. The engine doesn't download anything from a URI that
    > may be in that string. If w3 deletes that directory it will have *no*
    > effect on your processing.


    > It is customary to base the namespace key on the web site of the
    > creator, and to have documentation on the components of the namespace at
    > that location, but it is not required.


    > When processing XML data in a program, most (I can't say all) libraries
    > will provide things in the form of (name,namespace). What your program
    > will see is actually something more like ('template',
    > 'http://www.w3.org/1999/XSL/Transform') than 'xsl:template'. If it
    > isn't in the namespace identified by that URI, an XSLT engine won't
    > recognize the element as being XSLT.


    >> <xsl:stylesheet version="1.0"
    >> xmlns:xsl="http://localhost/XSL/Transform">
    >>
    >> or in a similar way? Which files are important and where to obtain
    >> them?


    > there are no files to obtain. A namespace is little more than a
    > qualifier used to correctly identify an XML component.


    Sorry for my stupidity. IMO, using variable or file names of that type is
    extremely misleading and comparable to a malpractice of naming the further
    Linux kernel gzip packets in a way like

    http://www.microsoft.com/2.6.1

    /dev/null/2.4.27heydude

    , which are, well, valid UNIX file names, but ...


    Mikko Nummelin
     
    Mikko Nummelin, Nov 20, 2003
    #3
  4. In article <>,
    Mikko Nummelin <> wrote:

    [About the convention of using http: urls for name spaces]

    % Sorry for my stupidity. IMO, using variable or file names of that type is
    % extremely misleading and comparable to a malpractice of naming the further
    % Linux kernel gzip packets in a way like

    % http://www.microsoft.com/2.6.1
    %
    % /dev/null/2.4.27heydude
    %
    % , which are, well, valid UNIX file names, but ...

    The problem is that you need to have a globally unique identifier. What
    would you like to use, that you can guarantee nobody else will use, or
    at least you can claim they're not being reasonable if they do use it?
    People started using http: protocol URIs because the network address
    is guaranteed to be unique and people can reasonably expect to
    control the URIs associated with addresses that they `own'.

    Someone could have defined a protocol for name spaces, like

    ns://www.w3.org/1999/XSL/Transform

    and saved everyone a lot of trouble, because the convention of putting
    documentation at the web address used for name-spaces only arose _after_
    lots and lots of people just assumed they'd find documentation there,
    and raised a fuss.

    Anyway, I think it's more confusing than misleading (certainly not
    `extremely misleading'. I have no idea what your analogy is supposed
    to mean (it's also confusing), but it seems likely that it's not
    particularly apt. Nothing has been mislabled, there's just a URI
    being used in a context which doesn't suggest there are any resources
    assoicated with it, and which has no resources associated with it.


    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Nov 21, 2003
    #4
  5. > Sorry for my stupidity. IMO, using variable or file names of that type is
    > extremely misleading and comparable to a malpractice of naming the further
    > Linux kernel gzip packets in a way like
    >
    > http://www.microsoft.com/2.6.1
    >
    > /dev/null/2.4.27heydude
    >
    > , which are, well, valid UNIX file names, but ...



    Namespaces are used in programming languages -- C++ or C# -- what's so
    "misleading" about this? This is a useful feature. One needs to read more
    before making striking statements...


    =====
    Cheers,

    Dimitre Novatchev.
    http://fxsl.sourceforge.net/ -- the home of FXSL
     
    Dimitre Novatchev, Nov 21, 2003
    #5
  6. In article <>,
    Mikko Nummelin <> wrote:

    >Sorry for my stupidity. IMO, using variable or file names of that type is
    >extremely misleading and comparable to a malpractice of naming the further
    >Linux kernel gzip packets in a way like
    >
    >http://www.microsoft.com/2.6.1


    Obviously it would be unwise to use Microsoft's domain name to name
    Linux objects :)

    But the point of using URIs is that it's easy to construct names that
    will be unique, by using your own domains. All W3C namespace names
    are URIs beginning http://www.w3.org, for example. There's no need
    for a registry of namespace names, and it's easy to see who is
    responsible for the namespace.

    Whether there is anything at the location specified by the URI is up
    to you. Often there is a schema, or a RDDL file, or a textual
    description of the namespace. Again, it would be unwise to put an
    unrelated document there. But the main purpose of namespaces is to
    disambiguate names, and for that purpose there is no need to
    dereference the name at all.

    -- Richard
    --
    Spam filter: to mail me from a .com/.net site, put my surname in the headers.

    FreeBSD rules!
     
    Richard Tobin, Nov 21, 2003
    #6
  7. Mikko Nummelin

    Chris Lovett Guest

    I like the convention of being able to browse to a given XML namespace URI
    and read up on what this namespace is all about. For example, there are
    web pages at http://www.w3.org/1999/XSL/Transform, I think this is cool --
    it is the ultimate in global online help for programmers. There's even
    opportunities here for folks to provide richer web sites with their schemas,
    provide a list of tools that know how to process that namespace and so on.


    "Patrick TJ McPhee" <> wrote in message
    news:bpk3jb$h2p$...
    > In article <>,
    > Mikko Nummelin <> wrote:
    >
    > [About the convention of using http: urls for name spaces]
    >
    > % Sorry for my stupidity. IMO, using variable or file names of that type

    is
    > % extremely misleading and comparable to a malpractice of naming the

    further
    > % Linux kernel gzip packets in a way like
    >
    > % http://www.microsoft.com/2.6.1
    > %
    > % /dev/null/2.4.27heydude
    > %
    > % , which are, well, valid UNIX file names, but ...
    >
    > The problem is that you need to have a globally unique identifier. What
    > would you like to use, that you can guarantee nobody else will use, or
    > at least you can claim they're not being reasonable if they do use it?
    > People started using http: protocol URIs because the network address
    > is guaranteed to be unique and people can reasonably expect to
    > control the URIs associated with addresses that they `own'.
    >
    > Someone could have defined a protocol for name spaces, like
    >
    > ns://www.w3.org/1999/XSL/Transform
    >
    > and saved everyone a lot of trouble, because the convention of putting
    > documentation at the web address used for name-spaces only arose _after_
    > lots and lots of people just assumed they'd find documentation there,
    > and raised a fuss.
    >
    > Anyway, I think it's more confusing than misleading (certainly not
    > `extremely misleading'. I have no idea what your analogy is supposed
    > to mean (it's also confusing), but it seems likely that it's not
    > particularly apt. Nothing has been mislabled, there's just a URI
    > being used in a context which doesn't suggest there are any resources
    > assoicated with it, and which has no resources associated with it.
    >
    >
    > --
    >
    > Patrick TJ McPhee
    > East York Canada
    >
     
    Chris Lovett, Nov 22, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Èý¹â
    Replies:
    1
    Views:
    585
    William F. Robertson, Jr.
    Jul 29, 2003
  2. Replies:
    0
    Views:
    5,148
  3. disen
    Replies:
    2
    Views:
    684
    Dani Isenegger
    Jan 4, 2005
  4. Anonymous
    Replies:
    3
    Views:
    543
    Ron Natalie
    Aug 18, 2003
  5. Replies:
    18
    Views:
    2,779
    Joseph Kesselman
    Oct 4, 2006
Loading...

Share This Page