Re: Case where well formed ness could fly away

On 5/1/07, Innovimax SARL <innovimax@gmail.com> wrote:
>
>
> Set attributes
> > > You have to take care of Uniqueness of Attributes
> > > <a ns1:a="2" xmlns:ns1="ns">
> > >
> > > attributes : <root ns2:a="3" xmlns:ns2="ns">
> >
> >
> > Attributes are merged and when they have the same name, the "attributes"
> > port
> > wins.
> >
>
> what is the same name ? local name or QName ? in the case I present what
> would be the result ?
>


Name means local name and namespace URI pairs.   A QName is a representation
of that
give the proper set of in-scope namespaces.


I hadn't intended namespace attributes to be handled by this step.
> >
>
> namespace attribute ? why are you talking about that ?
>

Namespace declarations can also be considered attributes.  They are
separated
in the infoset specification but could also be considered to be copied.

It might be the case that give certain QName values that a user wants
to copy/add namespace declarations with the p:set-attributes step.
Personally,
I'd be happy to not go there.


Unwrap
> > > Can fail, one case is identified, but what about removing the node
> > > which contains namespace declarations ?
> >
> >
> > Namespace declaration fixup will be necessary  during serialization for
> > the results of many steps--not just unwrap.
> >
>
> I'm sorry, I **strongly** disagree. What is you definition of
> serialization ? The namespace fixup should happen even when the flow will
> never be serialized. It's a DOM or SAX or StAX issue.
>

No.  It is perfectly legal to create a DOM element instance without having
declared the
namespace first.


As far, as I know, I will still have to be able to make a select on the
> resulting document
>
>
> As such, that's a serialization
> > problem.  Between steps, the namespaces and local names are known
> > and implementations that do not serialize between steps will not have
> > to worry about that.
> >
>
>
> I think you miss the question
>
> <a xmlns:ns2="ns1URI">
>   <b xmlns:ns2="ns2URI">
>     <ns2:c/>
>     <ns2:c/>
>     <ns2:c/>
>     <ns2:c/>
>   </b>
> </a>
>
> I want to unwrap "b", will i have
>
> <a xmlns:ns2="ns1URI">
>     <ns2:c/>
>     <ns2:c/>
>     <ns2:c/>
> </a>
>

The DOM (or whatever)  *knows* that the elements with local name 'c' name
the
namespace URI of 'ns2URI'.  Thus, serialization knows what to do (i.e.
fabricate
a declaration).

XSLT 1 and 2 do this all the time.



-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Tuesday, 1 May 2007 18:56:04 UTC