OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: XLink transformations

[ Lists Home | Date Index | Thread Index ]
  • From: Bruno Dumon <bruno2@dma.be>
  • Date: Fri, 21 Jul 2000 11:17:03 +0200

Michael Kraus wrote:
> I'm currently working on an XML/XSL/XLink Browser
> (http://www.pms.informatik.uni-muenchen.de/lehre/projekt-diplom-arbeit/browser-toolkit.html)
> and have the following problem: The Browser takes as input an XML file,
> an XSLT stylesheet and an XLink linkbase. The links refer to elements in
> the XML file, of course. Now, if the XML file is translated into FO (or
> HTML), how can the browser know to which element(s) a certain XLink
> refers?
> [...]

A couple of months ago I've written an XLink-processor for Cocoon (see
xml.apache.org), and I had to deal with the same issues. What I have
done is putting the responsibility for this with the stylesheet author.
If there's an (simple) xlink defined on a source element, the
stylesheet-author should make sure an HTML <a href="..."> element is
inserted in the destination (or transformed) document (if you're
converting to HTML, that is).

If the transformed document doesn't contain the element anymore, then
the link won't be there. And if you want a version of the document which
doesn't contain the links, you simply write a stylesheet which doesn't
insert linking elements.

For XPointers (used as fragment identifiers in a link destination) I did
the following: first resolve the XPointer on the source XML-document,
and insert a special attribute on the element that the xpointer points
to. Then, it is again the responsibility of the stylesheet to insert an
HTML <a name="..."> element in the destination document whenever it sees
this special attribute.

I hope this explanation was clear enough:) As the other replies suggest,
there's no way to transform the xpointers so that they still work on the
transformed document. After all, the transformed document can be
anything. It's very easy to write an XSLT stylesheet which converts a
10MB XML-document to just one <abc> element, how could the xpointers
possibly be transformed accordingly?

My XLink-processor also converted extended linkdescriptions in simple
xlinks and loaded external linkbases and such nice things. If you want
to have a look at it, search in the cocoon mailing list archives.

Greetings,

Bruno Dumon.




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS