Altova Mailing List Archives

Re: How is this part of the XSLT specification to be interpreted?

From: David Carlisle <davidc@--------->
Date: 6/21/2000 12:13:00 PM
me> .... use <fallback/>....


<xxx xmlns="http://a/b/c">
  <b a="2">
    <x:c xmlns:x="http:/x/y/z"/>

could be transformed to

<?xml version="1.0" encoding="utf-8" ?>
<x xmlns:y="http:/x/y/z">[xxx]</x>
<x:c xmlns:x="http:/x/y/z" xmlns="http://a/b/c"/>

by the stylesheet below.

It _is_ transformed to that using saxon.

xt and oraxsl (or at least the version I have, which may not be the latest)
don't support extension elements, so the documentation appears as
literal result elements in the output.

xalan (again, I'm not sure if this is the latest version) just dies
Xalan: was not successful.
XSLProcessor: done

But here is the stylesheet, it uses two elements in a documentation
namespace, one for documenting templates and one for documenting select
expressions. An XSLT stylesheet could easily take in this format and
pretty print the code below making for example the select expression be
an active link to its documentation.


<xsl:stylesheet xmlns:xsl=""

<xsl:output method="xml" indent="yes"/>

<xsl:template match="main:xxx">
 some doc about <emph>this</emph>  template
 <x>[<xsl:value-of select="name()"/>]</x>
 this select attribute selects grandchildren
 <xsl:apply-templates select="*/*"/>

<xsl:template match="y:c">
 some doc about <emph>this</emph> template, it matches 
 and copies c element nodes
 <xsl:copy-of select="."/>


Actually looking at it now in the mail buffer, perhaps it would have
been better to have put the xsl:copy expression _inside_ the fallback
rather than after the doc:select. Obviously the stylesheet that is
controlling the pretty printing basically controls what forms are

 XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.