Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Re: Output validation with XSLT 2.0

From: "Mukul Gandhi" <gandhi.mukul@--------->
To:
Date: 5/3/2008 5:00:00 PM
Thanks, Ken and Martin for useful explanations ...

I agree to the points mentioned, and am now more clear about this topic.

On 5/3/08, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:
> At 2008-05-03 21:49 +0530, Mukul Gandhi wrote:
> > On 5/3/08, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:
> > > Anyway, unused namespace declarations are innocuous in the result, so
> this
> > > is only an aesthetic issue.
> >
> > I agree.
> >
> > But the declaration,
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > generated in the output XML is not being used anywhere (i.e., there is
> > no reference to the xs: prefix in the generated XML).
> >
>
> That is *your* problem, not the processor's problem.  You added the
> namespace node to the result on the document element of the result ... what
> if 100 levels deep, 10 megabytes away from the start tag of the document
> element, you needed that namespace node to be in scope?
>
> > Shouldn't the processor be more intelligent to avoid generating any
> > namespace declarations which are used nowhere in the output?
> >
>
> By what criteria could that decision possibly be made?
>
> > Probably this could be a minor enhancement request for Saxon :)
> >
>
> I agree with Colin:  enhancements shouldn't break conformance.
>
> At 2008-05-03 21:57 +0530, Mukul Gandhi wrote:
> > I would like to learn how this could be non-compliant ...
> >
>
> Because the specification requires all attached namespace nodes to be copied
> to the result tree.  Since you didn't prune the namespace node for XSD, it
> is still attached to the literal result element, so it must be copied.
>
> And the specification cannot imply its removal or be changed to wait for
> your test of use:  the result tree can be instantaneously serialized, which
> would include any attached namespace nodes.  As soon as an element's content
> is begun, that element's start tag is allowed to be serialized to the output
> without keeping it around.  Remember the result tree cannot be inspected.
> This allows an application not to keep the result tree in memory before
> serialization.  Your "enhancement" would break so many aspects of
> implementation.
>
> I hope this helps.
>
> . . . . . . . . . . . Ken
>
> > On 5/3/08, Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> wrote:
> > > >>>>> "Mukul" == Mukul Gandhi <gandhi.mukul@xxxxxxxxx> writes:
> > >
> > >    Mukul> Probably this could be a minor enhancement request for
> > >    Mukul> Saxon :)
> > >
> > > I can't see Michael accepting it, as it would be non-compliant.
> >
>
>
> --
> World-wide corporate, govt. & user group XML, XSL and UBL training
> RSS feeds:     publicly-available developer resources and training
> G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
> Crane Softwrights Ltd.
> http://www.CraneSoftwrights.com/s/
> Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
> Male Cancer Awareness Nov'07
> http://www.CraneSoftwrights.com/s/bc
> Legal business disclaimers:
> http://www.CraneSoftwrights.com/legal
>
>


-- 
Regards,
Mukul Gandhi


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent