Re: in-scope namespaces & inline documents

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 UTC