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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
- Stylus Studio Code Samples & Utilities (364)
-> + New Advanced CSV to XML Data C... (3)
-> - Java mapper (1)
-> - XML Spy project conversion to ... (1)
-> + APIs and OCXs (2)
-> + No Topic (2)
-> + Profiling (3)
-> + xsl to xslfo (5)
-> + Does anyone use XML from ADO ... (5)
-> - XML from ADO Wizard (1)
-> + Weird XQuery results? (3)
-> - XSV xml schema validator (1)
-> + Menu structure (2)
-> + XQuery user-defined functions (2)
-> - Passing Parameter to Templates (3)
-> ->Re: Passing Parameter to ...
-> ->Re: Passing Parameter to ...
-> + XML To Database (2)
-> + XML Schema xsd:any and xsd:any... (2)
-> - XSL-FO Webinar Sample Files (1)
-> + Name Element (2)
-> + date of the day (5)
-> + Is there a 'Find Definition' f... (2)
-- Previous [61-80] [81-100] [101-120] Next
+ Stylus Studio Announcements (113)
Topic  
Postnext
Paul RajanSubject: Passing Parameter to Templates
Author: Paul Rajan
Date: 16 Jul 2002 01:01 AM
Hi,

I'm attching the three four files:
1. Cap2vista.xsl (Transformation)
2. 202614_out.xml (Main Input)
3. CapFormField.xml (Look-up)
4. Cap2Vista.xml (Output by xXcelon)
5. ResponseFromXSLT.xml.tmp (Output by Commandline XSLT processor)


When transform using cXcelon Cap2Vista.xml is the out output I get. But when run through any other commandline xslt processor the parameter passed to is empty and no element or field created. Could some one explain this.

Ta!

Paul Rajan
Melbourne




ApplicationCap2Vista.xsl
XSL Transformation Sheet

Application202614_out.xml
XSL Transformation Sheet

ApplicationCapFormField.xml
Look-up

ApplicationCap2Vista.xml
Output using eXcelon

ApplicationResponseFromXSLT.xml.tmp
Output by Command Line XSLT Processor

Postnext
Minollo I.Subject: Re: Passing Parameter to Templates
Author: Minollo I.
Date: 16 Jul 2002 02:16 AM
The problem is tricky, and in short it's a bug in the Stylus Studio processor.

In your stylesheet you are doing this:
{xsl:apply-templates select="$FormFieldTop"}

....where $FormFieldTop is a document fragment defined as:
{xsl:variable name="FormFieldTop"
select="document('CapFormField.xml')/Form/TableId/Fields"/}

So,the root element in $FormFieldTop is Fields.

You don't have a template rule which matches Fields; so the processor hits
the built-in template rule for "*", which does an apply-templates; which
means that it looks for template rules defined for Fields' children, Field
elements in your case.

You do have a template rule which matches Field elements, it's the one
declared as match="Fields/Field", and you are back into your code.

So, what's the problem? The problem is that built-in template rules are not
supposed to propagate parameters... and even if the Stylus Studio processor
does that, and even if it would probably be a cool feature, it's not part
of the XSLT 1.0 specs... This is the bug in our processor, that we will fix
in the next public update.

In the meanwhile, you can make all processors happy by changing:
{xsl:apply-templates select="$FormFieldTop"}
....into...
{xsl:apply-templates select="$FormFieldTop/Field"}

This way you won't go through the built-in template rule, and things will
work as expected.

Thanks for reporting this,
Minollo

Posttop
Paul RajanSubject: Re: Passing Parameter to Templates
Author: Paul Rajan
Date: 16 Jul 2002 03:03 AM
Hi Carlo,

Great man! It's magic! I've been struggling with this for a couple of days! It works now. Thanks for your help.


Paul Rajan
Melbourne

   
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.