W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > March 2007

Re: in-scope namespaces & inline documents

From: Alessandro Vernet <avernet@orbeon.com>
Date: Tue, 13 Mar 2007 16:34:29 -0700
Message-ID: <4828ceec0703131634j12b1b9ddkab381dbc37aff223@mail.gmail.com>
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>

On 3/13/07, Alex Milowski <alex@milowski.org> wrote:
> In the above pipeline, I declare all the prefixes on the document element of
> the pipeline.  This is what users typically do.  If they do that and we
> *DO NOT* copy the in-scope namespaces to the generated document
> element for inline documents, the user will get an error and be very confused.
>
> On the other hand, if we don't, a pipeline with a single identity step using
> an inline would generate output with more namespace declarations
> than specified on the inline.  This seems like the lesser evil.

Of those 2 options, I prefer the one you highlight in the first
paragraph. Some of the benefits I see include:

- It avoids unexpected errors
- It makes editing easier as pipeline authors don't need to worry too
much about the location where they declared namespaces (they can
always declare namespaces on the root element)

Like you say, the drawback is that you can end up with an output from
your XSLT step that has more namespaces than you would expect. But in
my experience this is rarely a problem. And in those cases where it
is, there are ways around it, like using exclude-result-prefixes or an
external stylesheet.

Alex
-- 
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/
Received on Tuesday, 13 March 2007 23:34:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:50 GMT