pauldick 01/08/30 10:52:36 Added: test/tests/capi/params params01.xml params01.xsl params02.xml params02.xsl params03.xml params03.xsl params04.xml params04.xsl params05.xml params05.xsl params06.xml params06.xsl Log: Parameter testing tests Revision Changes Path 1.1 xml-xalan/test/tests/capi/params/params01.xml Index: params01.xml =================================================================== <?xml version="1.0"?> <doc> </doc> 1.1 xml-xalan/test/tests/capi/params/params01.xsl Index: params01.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: variableman01 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 11.2 Values of Variables and Parameters --> <!-- Purpose: Test of passing a parameter to a stylesheet. Run from special bat file which contains the following additional option -param input 'testing 123'. --> <!-- Author: Paul Dick --> <xsl:param name="input" select="'defaultvalue'"/> <xsl:param name="input2" select="'defaultvalue'"/><!-- DON'T set externally --> <xsl:template match="doc"> <out> <xsl:value-of select="$input"/><xsl:text>; </xsl:text> <xsl:value-of select="$input2"/> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/capi/params/params02.xml Index: params02.xml =================================================================== <?xml version="1.0"?> <doc> </doc> 1.1 xml-xalan/test/tests/capi/params/params02.xsl Index: params02.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: variableman02 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 11.2 Values of Variables and Parameters --> <!-- Purpose: Test setting several parameters externally. Run from special bat file which contains the following additional options -param in1 'A' -param in2 'B' -param in3 'C' etc. Suggest setting 1-5, so you see default on 6. --> <!-- Author: David Marston --> <xsl:param name="in1" select="'default1'"/> <xsl:param name="in2" select="'default2'"/> <xsl:param name="in3" select="'default3'"/> <xsl:param name="in4" select="'default4'"/> <xsl:param name="in5" select="'default5'"/> <xsl:param name="in6" select="'default6'"/> <xsl:template match="doc"> <out> <xsl:value-of select="$in1"/> <xsl:value-of select="$in2"/> <xsl:value-of select="$in3"/> <xsl:value-of select="$in4"/> <xsl:value-of select="$in5"/> <xsl:value-of select="$in6"/> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/capi/params/params03.xml Index: params03.xml =================================================================== <?xml version="1.0"?> <doc> </doc> 1.1 xml-xalan/test/tests/capi/params/params03.xsl Index: params03.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xyz="http://www.lotus.com"> <!-- FileName: variableman03 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 11.2 Values of Variables and Parameters --> <!-- Purpose: Test external setting of parameter that has a QName. Run from special bat file which contains the following additional option -param xyz:in1 "'DATA'". --> <!-- Author: Paul Dick --> <xsl:param name="xyz:in1" select="'default1'"/> <xsl:template match="doc"> <out> <xsl:value-of select="$xyz:in1"/> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/capi/params/params04.xml Index: params04.xml =================================================================== <?xml version="1.0"?> <doc> </doc> 1.1 xml-xalan/test/tests/capi/params/params04.xsl Index: params04.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: variableman04 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 11.2 Values of Variables and Parameters --> <!-- Purpose: Show that top-level xsl:variable is unaffected by an attempt to set it externally. Run from special bat file which contains the following additional option -param input 'testing'. --> <!-- Author: David Marston --> <xsl:variable name="input" select="'defaultvalue'"/> <xsl:template match="doc"> <out> <xsl:value-of select="$input"/> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/capi/params/params05.xml Index: params05.xml =================================================================== <?xml version="1.0"?> <doc> </doc> 1.1 xml-xalan/test/tests/capi/params/params05.xsl Index: params05.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: variableman05 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 11.2 Values of Variables and Parameters --> <!-- Purpose: Test external setting of top-level param, then passing value to top-level variable via value-of. Run from special bat file which contains the following additional option -param input 'testing'. --> <!-- Author: David Marston --> <xsl:param name="input" select="defaultvalue"/> <xsl:variable name="tata" select="$input"/> <xsl:template match="/"> <out> <xsl:value-of select="$tata"/> </out> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/capi/params/params06.xml Index: params06.xml =================================================================== <?xml version="1.0"?> <doc> </doc> 1.1 xml-xalan/test/tests/capi/params/params06.xsl Index: params06.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: variableman06 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 11.2 Values of Variables and Parameters --> <!-- Purpose: Test external setting of top-level param, then passing value to top-level variable via value-of. Show that order of these top-level elements doesn't matter. Run from special bat file which contains the following additional option -param input 'testing'. --> <!-- Author: David Marston --> <xsl:variable name="tata" select="$input"/> <xsl:param name="input" select="defaultvalue"/> <xsl:template match="/"> <out> <xsl:value-of select="$tata"/> </out> </xsl:template> </xsl:stylesheet> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]