[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: namespace issue
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Tue, 11 Dec 2001 11:19:01 +0000
Hi Dave,

DPawson@xxxxxxxxxxx wrote:

output is a file using a nil prefix ns.
top level element specifies the default ns

<template match= x>
  <el xmlns="myns">


for all the children of this element (in the output), if I specify no ns, Saxon (correctly I guess), adds <el xmlns=""> i.e. reverts to the 'null' ns (or whatever its called).

Having specified the ns in the top level element,
must I really add the xmlns attribute to all children?


yes, to all [no namespace] children (any [myns] children get prefix-free), but only because you've specified "myns" as the *default* namespace at the higher level. If instead you have <x:el xmlns:x="myns"> then you can still use [no prefix] to refer to [no namespace].



<q> if a prefix foo is used in a tag, but the element does not have an xmlns:foo attribute, then the value of the parent element's xmlns:foo attribute will be used; if the parent does not have an xmlns:foo attribute, then the value of the grandparent element's xmlns:foo attribute will be used, and so on. </q> src = http://jclark.com/xml/xmlns.htm

I guess this still applies to the 'empty' ns? or is that special?


Exactly - still applies, not special.



Confused (again) by ns's.


Don't see why - you've explained it entirely correctly! Maybe you just find it too ugly to be credible?



regards -



Francis.



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread
  • namespace issue
    • DPawson - Tue, 11 Dec 2001 05:31:32 -0500 (EST)
      • Francis Norton - Tue, 11 Dec 2001 06:20:18 -0500 (EST) <=
      • David Carlisle - Tue, 11 Dec 2001 06:29:47 -0500 (EST)
      • <Possible follow-ups>
      • DPawson - Tue, 11 Dec 2001 07:21:19 -0500 (EST)
      • DPawson - Wed, 12 Dec 2001 03:19:27 -0500 (EST)
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member