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

RE: namespace question

From: Klotz, Leigh <Leigh.Klotz@xerox.com>
Date: Fri, 18 Jul 2008 10:33:18 -0700
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF4054FB84C@USA7061MS01.na.xerox.net>
To: <Nick_Van_den_Bleeken@inventivegroup.com>, "Aaron Reed" <aaronr@us.ibm.com>
Cc: <www-forms@w3.org>, <www-forms-request@w3.org>
Here's my take:  Omitting xmlns="" on the root element has another
advantage, in that it makes it easier for non-namespace-aware services
to accept the posted XML. The attribute
submission/@includenamespaceprefixes was added to facilitate
interoperation with services such as those that use DTD validation.
Since xmlns="" doesn't add anything to the party for namespace-aware
applications, and might startly DTD applications, leaving it off seems a
good plan.
Leigh.

________________________________

From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On
Behalf Of Nick_Van_den_Bleeken@inventivegroup.com
Sent: Thursday, July 17, 2008 11:40 PM
To: Aaron Reed
Cc: www-forms@w3.org; www-forms-request@w3.org
Subject: Re: namespace question



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
<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>
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>
<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> 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>
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>
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, and is believed to be clean. 
-- 
Received on Friday, 18 July 2008 17:35:30 GMT

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