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

Re: [good] Question about NS 1.1


xml xsl duplicate attribute


Michael Kay wrote:
> 
> James Anderson asked:
> >
> > Are there really cases where one copies text nodes from a context in
> > which a prefix had one binding to a context in which a prefix has a
> > different binding with the intent of effecting a change in the implied
> > universal names.
> 
> It may be that the prefix has a different binding in the target context;
> it's more likely that it has no binding.

Which means that, while the special case does work, for all the effort,
in the general case, the product can be an mal-formed dom. Even where is
it expected that one is testing for duplicate attribute names, that just
means that the operation will faill unnecessarily.

> 
> Consider a stylesheet:
> 
> <xsl:stylesheet xmlns:xsl="...." version="1.0"
>                 xmlns:math="java:java.lang.Math">
> 
> <xsl:template match="circle">
>   <area><xsl:value-of select="math:pi() * @radius * @radius"/></area>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> You now want to copy this template rule to a different stylesheet.

Yes, I would.

>                                                                    To do so,
> you have to copy the namespace declaration xmlns:math,

No you don't. If you model the value of the select attribute in the
intended domain.

>                                                        otherwise the
> template rule is meaningless. And of course, you want to do the copy using
> general-purpose XML tools, tools which don't understand that there's
> anything special about the select attribute of an <xsl:value-of> element.

We differ here. To pose a rhetorical question, are they really xml
tools? It's not an issue of "allow". it's a question of whether one
should ever have expected it to work.

> 
> Now, I hear lots of people saying we shouldn't have allowed this, and I'm
> inclined to agree. But we do allow it, and it works today, and people are
> taking advantage of the fact that it works today.

Years ago, when I worked as an operator for BBN, there were occasions
when I would witness TENEX wizards hunched over the operator's console
typing system patches into the debugger. I was in school then, so I
worked nights and weekends. Which means I never had a chance to overhear
the conversations between the CEO and one of them when they made a typo.
Maybe they never did. I suppose that means the process worked.

The computer room was pretty big. Eventually a twin appeared next to the
production system and it was more likely to see a system wizard hunched
over its console.

>                                                     And I have yet to see a
> proposal that cleans up the namespace model without breaking applications
> that work today according to the current specs.

To the extent that an application expects a prefix-namespace binding
which was apparent in the dynamic context of a given document's parser
to have indefinite extent, the application is already broken.

.

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.