You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@apache.org on 2001/06/21 23:28:20 UTC
cvs commit: xml-xalan/test/tests/conf/sort sort39.xsl sort39.xml
dmarston 01/06/21 14:28:20
Modified: test/tests/conf/sort sort39.xsl sort39.xml
Log:
Make select expression a better test
Revision Changes Path
1.2 +25 -49 xml-xalan/test/tests/conf/sort/sort39.xsl
Index: sort39.xsl
===================================================================
RCS file: /home/cvs/xml-xalan/test/tests/conf/sort/sort39.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sort39.xsl 2001/06/18 19:19:01 1.1
+++ sort39.xsl 2001/06/21 21:28:18 1.2
@@ -1,49 +1,25 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
-<xsl:output
- method="xml"
- omit-xml-declaration="yes"
- indent="yes"/>
-
-<xsl:param name="sortcolumn" select="'COLUMN1'"/>
-<xsl:param name="sortorder" select="'ascending'"/>
-
-<xsl:template match="xml">
- <xml>
- <data>
- <xsl:apply-templates/>
- </data>
- </xml>
-</xsl:template>
-
-<xsl:template match="data">
- <xsl:for-each select="row">
- <xsl:sort
- order="{$sortorder}"
- data-type="text"
- select="$sortcolumn"/>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="row">
- <xsl:copy-of select="."/>
-</xsl:template>
-
-<xsl:template match="columntype">
- <xsl:copy-of select="."/>
-</xsl:template>
-
-<xsl:template match="truncated">
- <xsl:copy-of select="."/>
-</xsl:template>
-
-<xsl:template match="truncationsize">
- <xsl:copy-of select="."/>
-</xsl:template>
-
-</xsl:stylesheet>
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <!-- FileName: SORT39 -->
+ <!-- Document: http://www.w3.org/TR/xslt -->
+ <!-- DocVersion: 19991116 -->
+ <!-- Section: 10 -->
+ <!-- Creator: David Marston -->
+ <!-- Purpose: Try to set lang from an expression. -->
+
+<xsl:output method="xml" indent="no"/>
+<xsl:template match="data">
+ <xsl:variable name="language" select="'en'"/>
+ <xsl:variable name="country" select="'US'"/>
+ <out><xsl:text>
+ </xsl:text>
+ <xsl:for-each select="row">
+ <xsl:sort lang="{concat($language,'-',$country)}"/>
+ <xsl:copy-of select="."/><xsl:text>
+ </xsl:text>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
1.2 +10 -14 xml-xalan/test/tests/conf/sort/sort39.xml
Index: sort39.xml
===================================================================
RCS file: /home/cvs/xml-xalan/test/tests/conf/sort/sort39.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sort39.xml 2001/06/18 19:19:00 1.1
+++ sort39.xml 2001/06/21 21:28:19 1.2
@@ -1,14 +1,10 @@
-<?xml version="1.0"?>
-<xml>
- <data>
- <row><COLUMN1>ABC</COLUMN1><COLUMN2>ABC2</COLUMN2></row>
- <row><COLUMN1>GHI</COLUMN1><COLUMN2>GHI2</COLUMN2></row>
- <row><COLUMN1>DEF</COLUMN1><COLUMN2>DEF2</COLUMN2></row>
- <columntype>
- <COLUMN1>string</COLUMN1>
- <COLUMN2>string</COLUMN2>
- </columntype>
- <truncated>no</truncated>
- <truncationsize>1000</truncationsize>
- </data>
-</xml>
\ No newline at end of file
+<?xml version="1.0"?>
+<data>
+ <row><COLUMN1>ABC</COLUMN1><COLUMN2>ABC2</COLUMN2></row>
+ <row><COLUMN1>GHI</COLUMN1><COLUMN2>GHI2</COLUMN2></row>
+ <row><COLUMN1>DEF</COLUMN1><COLUMN2>DEF2</COLUMN2></row>
+ <row><COLUMN1>AEI</COLUMN1><COLUMN2>AEI2</COLUMN2></row>
+ <row><COLUMN1>JKL</COLUMN1><COLUMN2>JKL2</COLUMN2></row>
+ <row><COLUMN1>DHL</COLUMN1><COLUMN2>DHL2</COLUMN2></row>
+ <row><COLUMN1>JHF</COLUMN1><COLUMN2>JHF2</COLUMN2></row>
+</data>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org