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

Re: XLink implemented in XSL

Subject: Re: XLink implemented in XSL
From: James Clark <jjc@xxxxxxxxxx>
Date: Sat, 15 May 1999 11:23:32 +0700
anchors in xslt
Paul Prescod wrote:
> Jonathan Borden wrote:
> >
> >         Would something like this work?
> Is your goal to implement XLink or to implement some small subset of XLink
> applicable to a document type? The latter is definitely possible. I posit
> that the former is possible (gotta love Turing completeness) but
> incredibly painful to implement. I tried it and gave up.
> Here's a document type:
> <!ELEMENT link (locators)>
> <!ATTLIST link %I-am-a-linking-element;>
> <!ELEMENT locator EMPTY>
> <!ATTLIST link %I-am-a-locator-element;>
> <!ELEMENT otherstuff (otherstuff|link)*>
> How do I make a template rule that matches any element that is an anchor.

> I tried to implement this specification but ran into two fairly
> fundamental limitations in XSL.
> #1. I can't figure out how to interpret a string from the document as a
> reference.

You can do it using docref(). (docref() handles URI references , that is
URI#fragment identifier, not just URIs.) docref(//link/locator/@href)
would find all the anchors. However, II think you would need some
built-in support in patterns and expressions to make supporting extended
links practical.  Even that wouldn't solve the problem of when an anchor
is not a single XSLT node (ie when it's an unmarked-up string); the only
way I can see to solve that is to have the anchor information in the
data model, eg having anchor nodes in the tree.

> Now that XSL and XPointer are being combined I think that being able to
> convert a string to a query is a no-brainer. It is necessary anyhow.
> #2. XSL's support for building abstractions is extremely poor because the
> only data types that can be passed from a template to its caller are
> opaque result node sets and strings. But what you really want to return is
> nodes and node lists. 

The current XSLT WD allows you to pass node-sets.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.