W3C home > Mailing lists > Public > www-forms@w3.org > July 2008

Re: namespace question

From: <Nick_Van_den_Bleeken@inventivegroup.com>
Date: Fri, 18 Jul 2008 08:40:14 +0200
To: Aaron Reed <aaronr@us.ibm.com>
Cc: www-forms@w3.org,www-forms-request@w3.org
Message-ID: <OF4AF7CAB9.B4EABAF9-ONC125748A.00231BE4-C125748A.0024A547@inventivegroup.com>
Hi Aaron,

When the root element of the instance has a default  namespace declaration 
with the attribute value of the empty string (xmlns=""), you may omit this 
default namespace declaration on the root element that is serialized (it 
is even preferable to do so, but it is not an error to xmlns="" on the 
root element).

See [1] for more information and more specific the text : "The attribute 
value in a default namespace declaration MAY be empty. This has the same 
effect, within the scope of the declaration, of there being no default 
namespace."

If you have any further questions please feel free to send an e-mail to 
the list. And we will do our best to help you ;)

Regards,

Nick Van den Bleeken  -  Research & Development Manager
Inventive Designers
Phone: +32 - 3 - 8210170
Fax: +32 - 3 - 8210171
Email: Nick_Van_den_Bleeken@inventivegroup.com

1: http://www.w3.org/TR/REC-xml-names/#defaulting

www-forms-request@w3.org wrote on 07/17/2008 06:47:03 PM:

> 
> Hi Nick,
> 
> Yep, we know it is a bug in Firefox that the root namespace from the 
> host document is making into the submitted document as the default 
> namespace when the default namespace was given to be empty.  But what 
> we'd like to know is whether a default empty namespace should be placed 
> on the submitted document at all.  If the first default namespace we see 

> is empty as we work our way up the tree, should we NOT output it and 
> from then on ignore the default namespace or should we output it?
> 
> Thanks,
> --Aaron
> 
> Nick_Van_den_Bleeken@inventivegroup.com wrote:
> > 
> > Hi Swithun,
> > 
> > Your problem is a bug in Firefox, the default namespace of the 
submitted 
> > instance should be the empty one. You have correctly specified this on 

> > your in-line instance.
> > 
> > I searched the Firefox XForms bugzilla database and found a bug report 

> > for this problem https://bugzilla.mozilla.org/show_bug.cgi?id=445285. 
> > You probably want to vote on this bug report.
> > 
> > Regards,
> > 
> > Nick Van den Bleeken  -  Research & Development Manager
> > Inventive Designers
> > Phone: +32 - 3 - 8210170
> > Fax: +32 - 3 - 8210171
> > Email: Nick_Van_den_Bleeken@inventivegroup.com
> > 
> > www-forms-request@w3.org wrote on 07/11/2008 03:23:10 PM:
> > 
> >  >
> >  > Hello
> >  >
> >  > I have a small puzzling problem. I have an XForms document where 
the
> >  > default namespace is declared as so:
> >  >
> >  > <html xmlns=" 
> > <http://www.w3.org/1999/xhtml>http://www.w3.org/1999/xhtml" ...
> >  >
> >  > (with all the other namespaces there too)
> >  >
> >  > Then, in one of the instances, the default namespace is declared as 

> > empty:
> >  >
> >  > <xf:instance id="text_instance">
> >  >    <tei:TEI xmlns=""> ...
> >  >
> >  > But then, when this instance is submitted, it shows up as:
> >  >
> >  > <tei:TEI xmlns=" <http://www.w3.org/1999/xhtml> 
> > <http://www.w3.org/1999/xhtml>http://www.w3.org/1999/xhtml" ...
> >  >
> >  > I would like to get rid of this default namespace declaration. I 
would
> >  > rather not have to use a non-default namespace for the XHTML 
elements.
> >  > Shouldn't the xmlns="" inside the instance override the 
> > xmlns="http..." in
> >  > the ancestor html element?
> >  >
> >  > Does anyone have any ideas? I'm using Firefox (2.0.0.14/0.8.5). I 
can 
> > ask
> >  > on the Mozilla XForms list if anyone thinks it is a implementation
> >  > specific problem.
> >  >
> >  > A copy of the form is here:
> >  > <http://swithun.servebeer.com/namespace.xhtml> 
> > <http://swithun.servebeer.com/namespace.xhtml>http://
> swithun.servebeer.com/namespace.xhtml
> >  >
> >  > Thanks.
> >  >
> >  > Swithun.
> >  >
> >  >
> >  > --
> >  > This message has been scanned for viruses and
> >  > dangerous content by MailScanner, and is
> >  > believed to be clean.
> >  > --
> >  >
> >  >
> > 
> > Inventive Designers' Email Disclaimer:
> > http://www.inventivedesigners.com/email-disclaimer
> > 
> > 
> > -- 
> > This message has been scanned for viruses and
> > dangerous content, and is believed to be clean.
> > -- 
> > 
> 
> 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> --
> 
> 

Inventive Designers' Email Disclaimer:   http://www.inventivedesigners.com/email-disclaimer =
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
Received on Friday, 18 July 2008 06:41:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:13 GMT