xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth Reakes <gar...@parthenoncomputing.com>
Subject Re: Writing documents with schemas and namespaces...
Date Fri, 23 Apr 2004 09:21:03 GMT
Hi Nick,

> Ok, but if I want an explicit one, I don't see any way to do that other
> than setting my elements with their prefix already set.

You are correct. If you want an explicit prefix in the output then you
have to set the prefix of the element. You do not then have to create the
namespace attribute, namespace normalization will do this. Note that
setting a prefix on a attribute does not guarantee the prefix will be in
the output.

> I understand why you can't give a prefix if there's no namespaceURI -
> that makes perfect sense.  I was just extending that conclusion to mean
> that a prefix was expected if a namespaceURI was specified.  Apparently
> that is not the case, but I'm not sure I completely understand that,
> because I don't really want DOM choosing my namespace qualifier in a
> random way.  Is it not expected that the user will want to explicitly
> set their namespace qualifier, rather than having it chosen for them?

The pain of namespaces ;) It depends on whether the documents are to be
human readable. If not then it does not matter at all as the documents
will be logically equivalent.


Gareth


-- 
Gareth Reakes, Managing Director      Parthenon Computing
+44-1865-811184                  http://www.parthcomp.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Mime
View raw message