Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XSLT on Mac



On Tue, 16 Mar 2004 12:08, Jim Schueler wrote:

I'm having trouble getting XSLT to work on IE for Mac. Does anybody
have a sample document that has been tested on this platform?

Nothing platform-specific about XSLT. Here's the obligatory example
assuming Xalan/J 2.5.2 installed in /usr/local/xalan directory.

Create all three files (from below) on Desktop.
From terminal, type as follows:

$ cd Desktop
$ chmod 644 hello.x[ms]l
$ chmod 755 xslt_hello.sh
$ ./xslt_hello.sh
$ open ~/Sites/hello.html



hello.xml (644)
---------------------------------------
<?xml version="1.0"?>
<greeting>
Hello, world!
</greeting>


hello.xsl (644)
---------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns="http://www.w3.org/TR/xhtml1/strict";
version="1.0">
<xsl:output method="html"/>

<xsl:template match="greeting">
<html>
<body>
<h1>
<xsl:value-of select="."/>
</h1>
</body>
</html>
</xsl:template>

</xsl:stylesheet>


xslt_hello.sh (755)
---------------------------------------
#! /bin/sh
input=~/Desktop/hello.xml
stylesheet=~/Desktop/hello.xsl
output=~/Sites/hello.html

xalan_lib=/usr/local/xalan/bin
xalan_jar=$xalan_lib/xalan.jar
xml_apis_jar=$xalan_lib/xml-apis.jar
xerces_jar=$xalan_lib/xercesImpl.jar
classpath=$xalan_jar:$xml_apis_jar:$xerces_jar

mainclass=org.apache.xalan.xslt.Process
java -cp "$classpath" $mainclass -in $input -xsl $stylesheet -tt -out $output



--
----------------------------------------------------------
Out of the 10Base-T, through the router, down the T1, over the
leased line, off the bridge, past the firewall... nothing but Net.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >XSLT on Mac (From: Jim Schueler <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.