At 18:39 14-05-2001, Simon St.Laurent wrote:
>Unless, of course, you're dealing with fragment identifiers. Since XSLT
>throws away the original tree, mapping 'result' to 'origin' is pretty
XSLT doesn't throw the original tree away - you have full access to it at
any point during result tree generation. It's true that the mapping of
source to result is many-to-many, but if you generated the target and the
link, you can use deterministic strategies to make sure that the mapping
always lines up. Take a look at Norm's DocBook stylesheets; for every
"interesting" element, if it has an ID, it gets that ID in the output FO
or HTML; if not, it gets an autogenerated ID. Links to that element use
the ID, or the same autogenerated ID (since generate-id() in XSLT is
guaranteed to be repeatable within a single transformation). Dealing with
third-party output is tougher. Sometime Real Soon Now the W3C will publish
a Note on styling and linking; there's also a paper Deb Hooker and I
presented over a year ago on some of the hard problems.
>Since CSS has the original tree, it's not so bad. (I think you
>tried to solve this problem once, maybe more.)
CSS is a simple language. It does simple things well; but when it comes to
reordering content (which is moderately common, in my experience), it just
doesn't go. You can use a combination of XSLT (or some other
transformation language) and CSS, but there's you're losing just as much
information as with full XSL (or more, since the XSL engine is (I hope) at
least aware that it incorporates transformation).
>If someone would implement an XLink+CSS engine, it might not be so bad,
>since CSS could rely on the facilities in the underlying
>implementation. Mozilla's done exactly that, though for simple XLinks only.
That would be nice, since CSS does have the :link selector (which XSLT
currently lacks; again, see the Real Soon Now "Linking & Styling" Note),
but that still doesn't cover generated labels which are fairly common.
Christopher R. Maden, XML Consultant
DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
<URL: http://crism.maden.org/consulting/ >
PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA