You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mk...@apache.org on 2002/10/03 22:17:09 UTC
cvs commit: xml-xalan/java/samples/extensions 1-redir.xsl 2-basicJscript.xsl 3-java-namespace.xsl 4-numlistJava.xsl 5-numlistJscript.xsl 6-sqllib-instantdb.xsl
mkwan 2002/10/03 13:17:09
Modified: java/samples/extensions 1-redir.xsl 2-basicJscript.xsl
3-java-namespace.xsl 4-numlistJava.xsl
5-numlistJscript.xsl 6-sqllib-instantdb.xsl
Log:
Update the extension samples to use the new namespace.
Revision Changes Path
1.4 +1 -6 xml-xalan/java/samples/extensions/1-redir.xsl
Index: 1-redir.xsl
===================================================================
RCS file: /home/cvs/xml-xalan/java/samples/extensions/1-redir.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- 1-redir.xsl 5 Oct 2000 20:17:13 -0000 1.3
+++ 1-redir.xsl 3 Oct 2002 20:17:09 -0000 1.4
@@ -1,12 +1,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
- xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.lib.Redirect"
+ xmlns:redirect="http://xml.apache.org/xalan/redirect"
extension-element-prefixes="redirect">
-
- <lxslt:component prefix="redirect" elements="write open close" functions="">
- <lxslt:script lang="javaclass" src="org.apache.xalan.lib.Redirect"/>
- </lxslt:component>
<xsl:template match="/">
<standard-out>
1.4 +6 -6 xml-xalan/java/samples/extensions/2-basicJscript.xsl
Index: 2-basicJscript.xsl
===================================================================
RCS file: /home/cvs/xml-xalan/java/samples/extensions/2-basicJscript.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- 2-basicJscript.xsl 20 Nov 2000 13:00:22 -0000 1.3
+++ 2-basicJscript.xsl 3 Oct 2002 20:17:09 -0000 1.4
@@ -3,13 +3,13 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
- xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:xalan="http://xml.apache.org/xalan"
xmlns:my-ext="ext2"
extension-element-prefixes="my-ext">
- <!--The component and its script are in the lxslt namespace and define the implementation-->
- <lxslt:component prefix="my-ext" elements="timelapse" functions="getdate">
- <lxslt:script lang="javascript">
+ <!--The component and its script are in the xalan namespace and define the implementation-->
+ <xalan:component prefix="my-ext" elements="timelapse" functions="getdate">
+ <xalan:script lang="javascript">
var multiplier=1;
// Extension element implementations always take two arguments. The first
// argument is the XSL Processor context; the second argument is the element.
@@ -26,8 +26,8 @@
d.setDate(d.getDate() + parseInt(numdays*multiplier));
return d.toLocaleString();
}
- </lxslt:script>
- </lxslt:component>
+ </xalan:script>
+ </xalan:component>
<xsl:template match="deadline">
<p><my-ext:timelapse multiplier="2"/>We have received your enquiry and will
1.5 +1 -1 xml-xalan/java/samples/extensions/3-java-namespace.xsl
Index: 3-java-namespace.xsl
===================================================================
RCS file: /home/cvs/xml-xalan/java/samples/extensions/3-java-namespace.xsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- 3-java-namespace.xsl 4 Oct 2000 17:00:33 -0000 1.4
+++ 3-java-namespace.xsl 3 Oct 2002 20:17:09 -0000 1.5
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:java="http://xml.apache.org/xslt/java"
+ xmlns:java="http://xml.apache.org/xalan/java"
version="1.0">
<xsl:template match="/">
1.4 +4 -4 xml-xalan/java/samples/extensions/4-numlistJava.xsl
Index: 4-numlistJava.xsl
===================================================================
RCS file: /home/cvs/xml-xalan/java/samples/extensions/4-numlistJava.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- 4-numlistJava.xsl 21 Dec 2000 14:59:32 -0000 1.3
+++ 4-numlistJava.xsl 3 Oct 2002 20:17:09 -0000 1.4
@@ -1,15 +1,15 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:xalan="http://xml.apache.org/xalan"
xmlns:counter="MyCounter"
extension-element-prefixes="counter"
version="1.0">
- <lxslt:component prefix="counter"
+ <xalan:component prefix="counter"
elements="init incr" functions="read">
- <lxslt:script lang="javaclass" src="MyCounter"/>
- </lxslt:component>
+ <xalan:script lang="javaclass" src="MyCounter"/>
+ </xalan:component>
<xsl:template match="/">
<HTML>
1.2 +5 -5 xml-xalan/java/samples/extensions/5-numlistJscript.xsl
Index: 5-numlistJscript.xsl
===================================================================
RCS file: /home/cvs/xml-xalan/java/samples/extensions/5-numlistJscript.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 5-numlistJscript.xsl 3 Aug 2000 19:07:46 -0000 1.1
+++ 5-numlistJscript.xsl 3 Oct 2002 20:17:09 -0000 1.2
@@ -1,13 +1,13 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:xalan="http://xml.apache.org/xalan"
xmlns:counter="MyCounter"
extension-element-prefixes="counter"
version="1.0">
- <lxslt:component prefix="counter"
+ <xalan:component prefix="counter"
elements="init incr" functions="read">
- <lxslt:script lang="javascript">
+ <xalan:script lang="javascript">
var counters = new Array();
function init (xslproc, elem) {
@@ -27,8 +27,8 @@
counters[name]++;
return null;
}
- </lxslt:script>
- </lxslt:component>
+ </xalan:script>
+ </xalan:component>
<xsl:template match="/">
<HTML>
1.4 +5 -1 xml-xalan/java/samples/extensions/6-sqllib-instantdb.xsl
Index: 6-sqllib-instantdb.xsl
===================================================================
RCS file: /home/cvs/xml-xalan/java/samples/extensions/6-sqllib-instantdb.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- 6-sqllib-instantdb.xsl 25 Jan 2002 19:41:18 -0000 1.3
+++ 6-sqllib-instantdb.xsl 3 Oct 2002 20:17:09 -0000 1.4
@@ -1,13 +1,17 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
- xmlns:sql="org.apache.xalan.lib.sql.XConnection"
+ xmlns:sql="http://xml.apache.org/xalan/sql"
extension-element-prefixes="sql">
<xsl:output method="html" indent="yes"/>
+
+ <!-- Substitute the select attribute by your own SQL query -->
<xsl:param name="query" select="'SELECT * FROM import1'"/>
<xsl:template match="/">
<!-- 1. Make the connection -->
+ <!-- Substitute the first parameter of sql:new() by your JDBC driver class -->
+ <!-- Substitute the second parameter of sql:new() by your database url -->
<xsl:variable name="products"
select="sql:new('com.lutris.instantdb.jdbc.idbDriver',
'jdbc:idb:./instantdb/sample.prp')"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org