[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Output validation with XSLT 2.0

Subject: Re: Re: Output validation with XSLT 2.0
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 03 May 2008 12:41:41 -0400
Re:  Re: Output validation with XSLT 2.0
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.