<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>teamsiems &#187; xslt</title>
	<atom:link href="http://teamsiems.com/tag/xslt/feed/" rel="self" type="application/rss+xml" />
	<link>http://teamsiems.com</link>
	<description>A team of Siems making observations</description>
	<lastBuildDate>Thu, 02 Feb 2012 15:59:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>XSLT and org.apache.xalan.xslt.Process</title>
		<link>http://teamsiems.com/2009/07/248/</link>
		<comments>http://teamsiems.com/2009/07/248/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 21:06:15 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[xalan]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://teamsiems.com/?p=248</guid>
		<description><![CDATA[I had to download and open the Xalan package from a mirror site at http://www.apache.org/dyn/closer.cgi/xml/xalan-j. I had to set the class path in DOS. I read http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html to find the command. set CLASSPATH=C:\xalan-j_2_7_1\xalan.jar;C:\xalan-j_2_7_1\serializer.jar;C:\xalan-j_2_7_1\xml-apis.jar;C:\xalan-j_2_7_1\xercesImpl.jar You have to set each path you &#8230; <a href="http://teamsiems.com/2009/07/248/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had to download and open the Xalan package from a mirror site at <a id="zh7m" title="http://www.apache.org/dyn/closer.cgi/xml/xalan-j" href="http://www.apache.org/dyn/closer.cgi/xml/xalan-j">http://www.apache.org/dyn/closer.cgi/xml/xalan-j</a>.</p>
<p>I had to set the class path in DOS. I read <a id="r4gz" title="http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html" href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html">http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html</a> to find the command.</p>
<pre>set CLASSPATH=C:\xalan-j_2_7_1\xalan.jar;C:\xalan-j_2_7_1\serializer.jar;C:\xalan-j_2_7_1\xml-apis.jar;C:\xalan-j_2_7_1\xercesImpl.jar</pre>
<p>You have to set each path you need and seperate them with semicolons (;). I read <a id="lkg0" title="http://xml.apache.org/xalan-j/getstarted.html" href="http://xml.apache.org/xalan-j/getstarted.html">http://xml.apache.org/xalan-j/getstarted.html</a> to find which .jar files I needed in the path. Then I dug through my computer to find them. Another note, the path needs to be set each time you run DOS.</p>
<p>Finally, I was able to run the Hello World transform that I found at <a id="ay6x" title="http://docstore.mik.ua/orelly/xml/xslt/ch02_02.htm" href="http://docstore.mik.ua/orelly/xml/xslt/ch02_02.htm">http://docstore.mik.ua/orelly/xml/xslt/ch02_02.htm</a>.</p>
<div>
<p>greeting.xml:</p>
<pre>&lt;?xml version="1.0"?&gt;
&lt;greeting&gt;
  Hello, World!
&lt;/greeting&gt;</pre>
</div>
<p>greeting.xsl:</p>
<pre>&lt;xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0"&gt;
  &lt;xsl:output method="html"/&gt;

  &lt;xsl:template match="/"&gt;
    &lt;xsl:apply-templates select="greeting"/&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template match="greeting"&gt;
    &lt;html&gt;
      &lt;body&gt;
        &lt;h1&gt;
          &lt;xsl:value-of select="."/&gt;
        &lt;/h1&gt;
      &lt;/body&gt;
    &lt;/html&gt;
  &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;</pre>
<p>Use the command</p>
<pre>java org.apache.xalan.xslt.Process -in greeting.xml -xsl greeting.xsl -out greeting.html</pre>
<p>And it worked!<br />
greeting.html:</p>
<pre>&lt;html&gt;
&lt;body&gt;
&lt;h1&gt;
  Hello, World!
&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<div class="googlePlusOneButton"><g:plusone href="http://teamsiems.com/2009/07/248/"  size="medium"   annotation="none"  ></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://teamsiems.com/2009/07/248/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

