[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

debug stylesheet,str:tokenize issue

Subject: debug stylesheet,str:tokenize issue
From: himanshu padmanabhi <himanshu.padmanabhi@xxxxxxxxx>
Date: Thu, 19 Mar 2009 18:22:40 +0530
 debug stylesheet
How to debug stylesheet for checking value of variables,params(like
'printf' statements in C)?
I tried using '<xsl:message>',but that message was not displayed even
though it was in the code flow.
Downloading 'oxygen' on my CentOS 5 machine.Will check whether it is
having line by line debugging facility like some XSLT debuggers on
windows.

I am using 'str:tokenize' function in XSL version 1.0.

Here 'args1' and 'args2' are space separated values passed from perl script.
args1=a b c d e   args2=1 2 3 4 5 6 7

I am passing 'value' as '--switch1 <a|b|c|d|e> -switch2 <1|2|3|4|5|6|7>'

So I need to tokenize $value first and add corrosponding value as the
first one in respective combo's followed by corresponding space
separated values(args1|args2)

<xsl:template match="filename">
    <tr>
        <td>   <xsl:value-of select="name"/>        </td>
        <td>    <xsl:value-of select="desc"/>        </td>
        <td>
            <xsl:if test="label = 'combo1'">
                <select name="args1">
                <xsl:call-template name="str:tokenize">
                     <xsl:with-param name="args" select="$args1" />
                </xsl:call-template>
                </select>
            </xsl:if>

            <xsl:if test="label = 'combo2'">
                <select name="args2">
                <xsl:call-template name="str:tokenize">
                     <xsl:with-param name="args" select="$args2" />
                </xsl:call-template>
                </select>
            </xsl:if>
        </td>
    </tr>
</xsl:template>

my.xml

<?xml version='1.0'?>
<?xml-stylesheet href="my.xsl" type="text/xsl"?>
<title>
    <filename>
            <name>name</name>
            <label>combo1</label>
            <Switch>--switch1</Switch>
            <desc>specify name</desc>
    </filename>
    <filename>
            <name>ip</name>
            <label>combo2</label>
            <Switch>--switch2</Switch>
            <desc>specify ip address</desc>
    </filename>
</title>

Yes.As you might have figured out,it is the usual 'EDIT' functionality
of any application.I configured the entity by selecting values from 2
combos and on clicking edit,I should see the previous set one as first
ones,followed by remaining values.

Can I change str:tokenize to achieve this? or without changing it
also,I can achieve the said.
I need to tokenize 'value' to decide first values in 'args1' and 'args2'.
----------------------------
Thanks and Regards,
Himanshu Padmanabhi

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.