W3C home > Mailing lists > Public > www-style@w3.org > October 2001

XSLT: Multiple Output Documents

From: Jeffrey Yasskin <jyasskin@mail.utexas.edu>
Date: Sat, 6 Oct 2001 16:50:02 -0400 (EDT)
Message-ID: <000001c14ea8$8c48ad50$682d7481@bluejay>
To: <www-style@w3.org>
I was wondering what the status of the <xsl:document> element is. It was
one of my favorite features of XSLT 1.1, but it's not mentioned in the
XSLT 2.0 requirements. I suspect it has been dropped, but I have not
seen an explanation why.

I recently had a conversation on netscape.public.mozilla.layout.xslt
with Axel Hecht in which he pointed out several problems with this
feature, and I pointed out several solutions. The biggest problem he
pointed out was that an XSLT output document could hide a valid page
written by someone else. For instance, someone could output to
http://www.microsoft.com/ and hide the real Microsoft site. (If I'm
misrepresenting Axel, please correct me.)
My solution is to limit the "href" attribute of the <xsl:document>
element to relative URIs without ../ steps in the path. Then, if your
main document is named "index.xml", subdocuments could be addressed by
"index.xml/subdoc1.html". This file cannot actually exist on the server,
so spoofing problems are avoided. If the same address were typed into
another browser window, the server would just return a 404 error. The
only way to access this document would be through links from the main
document and other subdocuments.
A batch transform, however, should be able to generate documents
anywhere in the directory structure. Again, absolute URIs don't make
sense, but now ../ steps should be allowed.
Obviously, this would break the current symmetry between batch
transforms and browser transforms. Since the two processes are
fundamentally different, I think this break is acceptable.

I don't know anything about the implementation issues of this. This
suggestion is certainly not the best one possible, so please suggest
alternatives. But I think the multiple output documents feature would be
useful to a lot of people and should be saved.

Jeffrey Yasskin
Received on Monday, 8 October 2001 08:39:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:59 UTC