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
Ray WenderlichSubject: Exemplar XSLT Transformations
Author: Ray Wenderlich
Date: 14 Mar 2006 03:46 PM
Hi,

I'm new to Stylus Studio so excuse me if this is a n00b question. I would like to use Stylus Studio to run the following transformation:

<?xml version='1.0'?>
<person xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<name2><xsl:value-of select="concat(/muppets/muppet/surname, ' ', /muppets/muppet/name)" /></name2>
<description><xsl:value-of select="/muppets/muppet/description"/></description>
</person>

On the following document:

<?xml version="1.0"?>
<muppets>
<muppet>
<surname/>
<name>Kermit</name>
<description>The most well-known Muppet!</description>
<rating>high</rating>
</muppet>
<muppet>
<surname/>
<name>Gonzo</name>
<description>A unique blue Muppet!</description>
<rating>medium</rating>
</muppet>
<muppet>
<surname>Ms.</surname>
<name>Piggy</name>
<description>An annoying female pig.</description>
<rating>low</rating>
</muppet>
</muppets>

When I try to run the transformation via the "Scenario" view, it complains that I haven't started with a <stylesheet> or <transform> element. Does this mean I can't use the exemplar-style method of writing transforms in Stylus Studio, or is there some step I'm missing?

By the way, I can use xalan to do this tranformation at the command line via "xalan -in muppet.xml -xsl muppet.xsl" and just want to know if I can do this through the Stylus Studio GUI.

Thanks!!

Postnext
(Deleted User) Subject: Exemplar XSLT Transformations
Author: (Deleted User)
Date: 14 Mar 2006 04:15 PM
Hi, Ray. You are using one of the simplified stylesheet syntaxes described in the XSLT Recommendation, Section 2.3. As mentioned in the Stylus Studio Release Notes, this is not supported by the built-in XSLT processor. However, your XSLT will run if you use the XalanJ or Saxon processors.

You can change the processor on the Processor tab of the Scenario Properties dialog box. Click XSLT > Scenario Properties, or click the [...] button to the right of the Scenario drop-down list in the XSLT Editor to display it.

Hope this helps.

David Foster
Stylus Studio Team

Posttop
Ray WenderlichSubject: Exemplar XSLT Transformations
Author: Ray Wenderlich
Date: 15 Mar 2006 07:58 AM
Thank you very much David, that worked great!

 
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.