• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

graphics/H03-May-2022-

images/H03-May-2022-

resources/H03-May-2022-

README.xsltH A D26-Mar-20143.6 KiB13699

README.xsltcH A D26-Mar-20144.1 KiB144101

README.xslt

1NAME
2	xslt - optional command wrapper for Apache/Xalan XSLTC runtime processor.
3
4SYNOPSIS
5	xslt [-j <jarfile>] [-xhs]
6	     {-u <document_url> | <document>}  <class>
7             [<name1>=<value1> ...]
8
9
10DESCRIPTION
11	This command-line tool is a wrapper for the Java class
12	org.apache.xalan.xsltc.cmdline.Transform. See CODE section
13	below.
14
15	The Sun XSLT runtime processor is a Java-based tool for
16	transforming XML document files using a translet (compiled
17	stylesheet).
18
19	The XSLT processor can be run on any platform including UNIX,
20	Windows, NT, Mac that supports Java.
21
22OPTIONS
23
24	The following options are supported:
25
26	-j <jarfile>
27		gets the translet <class> from the specified <jarfile>
28		instead of from the user's CLASSPATH.
29
30	-u
31		Specifies that the XML <document> location will be a URI
32		such as 'http://myserver/hamlet.xml'.
33
34	-x
35		Turn debugging messages on.
36
37	-h
38		Output help screen.
39
40	-s
41		Prevent the command line tool from calling System.exit()
42
43OPERANDS
44
45	The following operands are supported:
46
47	<document>     		An XML document to be processed.
48	<document_url>     	An XML document to be processed, specified
49				as a URL (See -u option above).
50
51	<class>			The translet that will do the processing.
52				The translet may optionally take a set of
53				global parameters specified as name-value
54				pairs. A name-value pair uses the format
55				<name>=<value>.
56
57CODE
58	Here is an example script to implement this command. You will have
59	to define INSTALLDIR to be the directory where you install XalanJ.
60
61	#!/bin/sh
62	# apxslt - Apache XSLT run script.
63	#
64	# if a -j <jarfile> option is set, find it and save off the <jarfile>
65	# argument.
66	#
67	jOptionSeen="0";
68	jarfile="";
69	for arg in $*
70	do
71	   if [ $arg = "-j" ] ; then
72		jOptionSeen="1";
73	   elif [ $jOptionSeen = "1" ] ; then
74		jarfile=$arg
75		jOptionSeen="0";
76	   fi
77	done
78
79	#
80	XSLTC=${INSTALLDIR}/java/lib/xsltc.jar
81	XERCES=${INSTALLDIR}/java/lib/xercesImpl.jar
82	XML=${INSTALLDIR}/java/lib/xml-apis.jar
83	CLASSPATH=.:${XSLTC}:${XERCES}:${XML}:$jarfile
84
85	java -cp ${CLASSPATH} org.apache.xalan.xsltc.cmdline.Transform "$@"
86
87
88EXAMPLES
89	Example 1:  Processing an XML document.
90
91	example%  xslt hamlet.xml hamlet
92
93	where the current working directory contains an XML document
94	'hamlet.xml' to be processed by the translet class 'hamlet'.
95	The translet would have been created initially using
96	xsltc to compile a XSLT stylesheet named 'hamlet.xsl'.
97
98	Example 2:  Loading translet from a jar file.
99
100	example%  xslt -j hamlet.jar hamlet.xml hamlet
101
102	In this case the translet class 'hamlet' is loaded from the
103	specified jar file, 'hamlet.jar' instead of from the user's
104	CLASSPATH.
105
106	Example 3: If the translet defined global parameters, then
107	these can be passed on the command line to the runtime processor
108	as a space separated list of name-value pairs using the format
109	<name>=<value>. For example,
110
111	example%  xslt hamlet.xml hamlet speaker=HAMLET 'scene=SCENE IV'
112
113	Notice that the second name-value pair had to be quoted due to
114	the intervening space in the value "SCENE IV".
115
116	example% xslt -u http://zarya.east/test.xml hamlet
117
118	where the xml document 'test.xml' can be specified as a URL.
119
120FILES
121	file.xml		input XML document to be processed.
122	file.class		byte code file.
123	file.jar		java archive file.
124
125SEE ALSO
126	xsltc, jar.
127
128BUGS
129	See the Apache JIRA issue tracker: http://issues.apache.org/jira
130
131AUTHORS
132	Morten Jorgensen		   morten.jorgensen@ireland.sun.com
133	G. Todd Miller                             todd.miller@east.sun.com
134	Jacek Ambroziak
135	Santiago Pericas-Geertsen
136

README.xsltc

1NAME
2	xsltc - optional command wrapper for Apache/Xalan XSLT Compiler
3
4SYNOPSIS
5	xsltc [-o <output>] [-d <directory>] [-j <jarfile>]
6	      [-p <package name>] [-uxhsi] [<stylesheet>... ]
7
8DESCRIPTION
9	This command-line tool is a wrapper for the Java class
10	org.apache.xalan.xsltc.cmdline.Compile. (See CODE below)
11
12	The Sun XSLT Compiler is a Java-based tool for compiling XSLT
13	stylesheets into lightweight and portable Java byte codes
14	called translets.
15
16	The XSLT Compiler can be run on any platform including UNIX,
17	Windows, NT, Mac that supports Java 1.2.x or later. The generated
18	translets can be run on any platform that supports a Java
19	Runtime Environment, including a Palm Pilot with J2ME CLDC
20	(Java 2 Micro Edition, Connected Limited Device Configuration).
21
22OPTIONS
23
24	The following options are supported:
25
26	-o <output>
27		Changes the name of the generated translet class.
28		By default, the translet class would be named
29		<stylesheet>, if -o <output> is set, then the
30		translet class would be named <output>. Translet
31		class files are written as .class files.
32
33	-d <directory>
34		Changes the destination directory. By default, any
35		translet class files generated would be placed in
36		the current working directory. If -d <directory>
37		is specified, the files would be output to <directory>.
38
39	-j <jarfile>
40		Outputs all generated translet class files into a
41		jar file named <jarfile>.jar. When this option is
42		used only a jar file will be output.
43
44	-p <package name>
45		Specify a package name for all generated translet
46		class.
47
48	-u
49		Specifies that <stylesheet> location will be a URI
50		such as 'http://myserver/stylesheet1.xsl'.
51
52	-i
53		Specify that the stylesheet should be read from stdin.
54
55	-x
56		Turn debugging messages on.
57
58	-h
59		Output help screen.
60
61	-s
62		Prevent the command line tool from calling System.exit()
63
64
65OPERANDS
66
67	The following operand is supported:
68
69	<stylesheet>    A path name of an input stylesheet file.
70
71CODE
72	Here is an example wrapper script to implement this command.
73        You should define 'INSTALLDIR' to be the directory where you
74        have installed XalanJ, for example, '/usr/local/xml-xalan'.
75
76	#!/bin/sh
77	JAR=${INSTALLDIR}/java/lib/xsltc.jar
78	XER=${INSTALLDIR}/java/lib/xercesImpl.jar
79	XML=${INSTALLDIR}/java/lib/xml-apis.jar
80	JCPR=${INSTALLDIR}/java/lib/runtime.jar
81	BCEL=${INSTALLDIR}/java/lib/BCEL.jar
82	JCP=${INSTALLDIR}/java/tools/java_cup.jar
83	JLEX=${INSTALLDIR}/java/tools/JLex.jar
84	REGEXP=${INSTALLDIR}/java/lib/regexp.jar
85
86        CLASSPATH=.:${JAR}:${XER}:${XML}:${JCPR}:${BCEL}:${JCP}:${JLEX}:${REGEXP}
87        java -cp ${CLASSPATH} org.apache.xalan.xsltc.cmdline.Compile "$@"
88
89
90EXAMPLES
91	Example 1:  Creating a translet from stylesheet 'hamlet.xsl'.
92
93	example%  xsltc hamlet.xsl
94
95	would produce a set of class files such as 'hamlet.class',
96	'hamlet$0.class', 'hamlet$1.class'.
97
98	Example 2:  Outputting all classes into a jar file.
99
100	example%  xsltc -j hamlet.jar hamlet.xsl
101
102	would produce a single jar file output, 'hamlet.jar' which would
103	contain all the generated .class files for the hamlet translet.
104
105	Example 3: Naming the class file.
106
107	example%  xsltc -o newhamlet hamlet.xsl
108
109	would produce a set of class files such as 'newhamlet.class',
110	'newhamlet$0.class', etc rather than the default which would
111	be 'hamlet.class', 'hamlet$0.class', etc.
112
113	Example 4: Multiple stylesheets.
114
115	example%  xsltc hamlet1.xsl hamlet2.xsl hamlet3.xsl
116
117	would produce a set of class files derived from the three
118	stylesheets.
119
120	Example 5: Package Specification.
121
122	example% xsltc -p com.mycompany.translets hamlet.xsl
123
124	would produce a set of class files such as
125	'com/mycompany/translets/hamlet.class',
126	'com/mycompany/translets/hamlet$0.class', etc.
127
128FILES
129	file.xsl		input XSLT stylesheet
130	file.class		byte code file
131	file.jar		java archive file
132
133SEE ALSO
134	xslt, jar.
135
136BUGS
137	See the Apache JIRA issue tracker: http://issues.apache.org/jira
138
139AUTHORS
140	Morten Jorgensen,		   morten.jorgensen@ireland.sun.com
141	G. Todd Miller,                            todd.miller@east.sun.com
142	Santiago Pericas-Geertsen
143	Jacek Ambroziak
144