XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Jim FunderburkSubject: stylus xslt v. xalan (first example)
Author: Jim Funderburk
Date: 18 Oct 2006 07:33 PM
I am using Stylus to learn xml. I am working through examples in book XML in a nutshell. In chapter 8 appears the first example regarding xslt. A simple xml file is transformed using an 'empty' xslt sheet.
My question regards three slightly different ways the output appears:
1. Stylus preview window
2. Saving stylus preview window to disk and looking at it
3. The output generated by xalan applied to same files.
How should I think of the differences?

Thanks for any suggestions.

Here are all the details:
After entering the code into appropriate xml and xsl files in Stylus Studio, the preview window shows all the text in a single line:

Alan Turing computer scientist mathematician cryptographer Richard P Feynman physicist Playing the bongoes.

When I save the preview window to disk it looks like:





Alan
Turing

computer scientist
mathematician
cryptographer




Richard
P
Feynman

physicist
Playing the bongoes


When I use xalan to process the files (not within stylus but within emacs shell under windows xp), the output looks like:

<?xml version="1.0" encoding="UTF-8"?>



Alan
Turing

computer scientist
mathematician
cryptographer




Richard
P
Feynman

physicist
Playing the bongoes


How should I think about the differences in this very simple case?

Here's the xml file:
<?xml version="1.0"?>
<people>

<person born="1912" died="1954">
<name>
<first_name>Alan</first_name>
<last_name>Turing</last_name>
</name>
<profession>computer scientist</profession>
<profession>mathematician</profession>
<profession>cryptographer</profession>
</person>

<person born="1918" died="1988">
<name>
<first_name>Richard</first_name>
<middle_initial>P</middle_initial>
<last_name>Feynman</last_name>
</name>
<profession>physicist</profession>
<hobby>Playing the bongoes</hobby>
</person>

</people>

Here's the xsl file:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

</xsl:stylesheet>


Posttop
Ivan PedruzziSubject: stylus xslt v. xalan (first example)
Author: Ivan Pedruzzi
Date: 18 Oct 2006 10:55 PM
Jim,

Be sure to use "Preview text" in the preview window because the IE preview collapses white-spaces.

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.