ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
RE: [xml-dev] QNames in attribute values
by Michael Kay other posts by this author
Jan 29 2002 10:05AM messages near this date
RE: [xml-dev] QNames in attribute values | Re: [xml-dev] QNames in attribute values
>  Why must namespaces be restricted to only scoping element and
>  attribute
>  names? That seems to me to be unnecessarily restrictive.
>  Other artifacts
>  need name-scoping mechanisms, as well, and I don't see why we
>  should force
>  them to find another means of accomplishing this.

I think the problem is (a) that a document that uses QNames in content is
dependent on the namespace prefixes, and (b) that this dependency isn't
explicit. The result of this is that when a processor (e.g. an XSLT
processor) copies an element to a new place, it has to copy all the in-scope
namespace nodes, because it has no way of knowing which of the namespace
nodes are actually needed.

XSLT has an explicit mechanism, exclude-result-prefixes, to allow users to
declare that some of the in-scope namespaces for a literal result element in
the stylesheet are not needed in the result tree. There is no equivalent
mechanism to exclude namespaces when copying from the source tree.

Perhaps we need variant namespace declarations xmlNS="uri" and
xmlNS:prefix="uri" that declare namespaces that will only be used in element
and attribute names: this would mean these namespaces don't need to be
copied if they aren't needed, and it would mean the prefixes can safely be
changed when copying.

Mike Kay


-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org> 

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl> 
Thread:
Michael Brennan
Michael Kay
james anderson
Evan Lenz
Ronald Bourret
james anderson
Paul Prescod
Jonathan Borden
Jonathan Borden
Ronald Bourret
Paul Prescod
Paul Prescod
Paul Prescod
Michael Kay
james anderson
Paul Prescod
Simon St.Laurent
John Cowan

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved