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

Re: namespace issue

Subject: Re: namespace issue
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Tue, 11 Dec 2001 11:19:01 +0000
namespace issue with src
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)

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.