1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/XSLForms/XSL/Extract.xsl Fri May 06 19:10:57 2005 +0000
1.3 @@ -0,0 +1,58 @@
1.4 +<?xml version="1.0"?>
1.5 +<xsl:stylesheet version="1.0"
1.6 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.7 + xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias"
1.8 + xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"
1.9 + xmlns:dyn="http://exslt.org/dynamic"
1.10 + extension-element-prefixes="dyn">
1.11 +
1.12 + <xsl:output indent="yes"/>
1.13 + <xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>
1.14 +
1.15 + <xsl:param name="element-id"/>
1.16 +
1.17 +
1.18 +
1.19 + <!-- Start at the top, finding only the specified element. -->
1.20 +
1.21 + <xsl:template match="/">
1.22 + <axsl:stylesheet version="1.0"
1.23 + xmlns:dyn="http://exslt.org/dynamic"
1.24 + extension-element-prefixes="dyn">
1.25 +
1.26 + <axsl:output indent="yes"/>
1.27 + <axsl:param name="element-path"/>
1.28 +
1.29 + <!-- NOTE: Hard-coded doctypes to hopefully satisfy JavaScript code. -->
1.30 + <!-- doctype-public="-//W3C//DTD XHTML 1.1//EN"
1.31 + doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" -->
1.32 +
1.33 + <axsl:template match="/">
1.34 +
1.35 + <!-- Include the remaining attributes. -->
1.36 + <xsl:apply-templates select="@*"/>
1.37 +
1.38 + <!-- Process the elements. -->
1.39 + <axsl:for-each select="dyn:evaluate($element-path)">
1.40 + <xsl:for-each select="//*[@id=$element-id]">
1.41 + <xsl:copy>
1.42 + <xsl:apply-templates select="@*|node()"/>
1.43 + </xsl:copy>
1.44 + </xsl:for-each>
1.45 + </axsl:for-each>
1.46 +
1.47 + </axsl:template>
1.48 + </axsl:stylesheet>
1.49 + </xsl:template>
1.50 +
1.51 +
1.52 +
1.53 + <!-- Replicate unknown elements. -->
1.54 +
1.55 + <xsl:template match="@*|node()">
1.56 + <xsl:copy>
1.57 + <xsl:apply-templates select="@*|node()"/>
1.58 + </xsl:copy>
1.59 + </xsl:template>
1.60 +
1.61 +</xsl:stylesheet>
2.1 --- a/XSLForms/XSL/Prepare.xsl Fri May 06 19:10:17 2005 +0000
2.2 +++ b/XSLForms/XSL/Prepare.xsl Fri May 06 19:10:57 2005 +0000
2.3 @@ -6,7 +6,6 @@
2.4
2.5 <xsl:output indent="yes"/>
2.6 <xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>
2.7 - <xsl:variable name="template-expr">http://www.boddie.org.uk/ns/xmltools/template-expr</xsl:variable>
2.8
2.9
2.10