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] Re: Can XLink be fixed?
by Keith W. Boone other posts by this author
Aug 24 2002 4:26PM messages near this date
Re: [xml-dev] Re: Can XLink be fixed? | [xml-dev] Renamer-att (was: Can XLink be fixed?)
From what I understand, one "problem" is that xlink requires the use of the
Xlink namespace on href and type, and that others want to "have there cake
and eat it too", without having to use the XLink namespace [or at least
without having to write with it].  Folks would also like to be "backwards"
compatible with other markup languages [i.e., XHTML], so that attributes
like a/@src can also be used as links.

Now, assuming that xlink:href values are expressed as XPointers, define a
scheme for the XPointer framework called eval(), which evaluates the
XPointer Expr [just as xpointer() does], but then further evaluates the
string value of the result as an XPointer Expr.

So now, you could define the xlink attributes on img to be fixed, as
follows:

<!ELEMENT img EMPTY> 
<!ATTLIST img
	xlink:type	(simple)	#FIXED 	'simple'
	xlink:href	CDATA		#FIXED	'#eval(here()/../@src)'
		:
> 

Which then means that:
1.  You can write src='whatever', and have it be evaluated as you would
expect.
2.  You don't have to write xlink: if you don't want.
3.  You don't have to change the XLink standard, just the XPointer one,
which isn't quite done yet, and has this provision for extension by new
schemes which means that even when it is finished, it can still be extended.

Now arguably, eval() is overkill to solve this problem.  Since most use
would simply be in the form '#eval(here()/../@src)', you might define a
scheme named link(attr), whose argument is the name of an attribute.  Then
instead of #eval(here()/../@src), you could say #link(src).

Anyway, it's just a thought.

	Keith


-----------------------------------------------------------------
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:

Rick Jelliffe
Henry S. Thompson
Norman Walsh
Norman Walsh
Paul Prescod
Simon St.Laurent
Norman Walsh
Simon St.Laurent
Robin Berjon
=?iso-8859-1?Q?Bill_de_h=D3ra?=
Simon St.Laurent
Paul Prescod
Simon St.Laurent
Robin Berjon
Simon St.Laurent
Simon St.Laurent
Norman Walsh
Simon St.Laurent
Norman Walsh
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
J. David Eisenberg
Norman Walsh
J. David Eisenberg
Robin Berjon
Norman Walsh
Simon St.Laurent
Norman Walsh
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
Shane McCarron
Simon St.Laurent
Joe English
Norman Walsh
Simon St.Laurent
Keith W. Boone
Arjun Ray
Arjun Ray
Rick Jelliffe
Simon St.Laurent
Simon St.Laurent
Tim Bray
Simon St.Laurent
Tim Bray
Simon St.Laurent
Elliotte Rusty Harold
Simon St.Laurent
Lars Marius Garshol
Bob DuCharme
Elliotte Rusty Harold
Didier PH Martin
Elliotte Rusty Harold
Simon St.Laurent
Elliotte Rusty Harold
Norman Walsh
Tim Bray
Simon St.Laurent
Tim Bray
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
Ann Navarro
Simon St.Laurent
Elliotte Rusty Harold
Simon St.Laurent
Simon St.Laurent
Elliotte Rusty Harold
Simon St.Laurent
John Cowan
Rick Jelliffe
Simon St.Laurent
John Cowan
Simon St.Laurent
John Cowan
Simon St.Laurent
Mike Champion
Didier PH Martin
John Cowan
Mike Champion
Simon St.Laurent
Norman Walsh
Tim Bray
Simon St.Laurent
Rick Jelliffe
Norman Walsh
Masayasu Ishikawa
John Cowan
Jeff Rafter

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