xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Using URL params as xml tag attributes


Subject: [xsl] Using URL params as xml tag attributes
From: "Mike Dickson" <mikedickson@xxxxxxxxx>
Date: Tue, 30 Mar 2004 21:48:00 -0800

I would like to use a URL parameter in my Cocoon-XSLT as an attribute in a
XML tag.
(http://www.yourdomain.com:8080/cocoon/vc/Hello.xml?djUser.id=1&djUser.first
Name=Mike)

You will notice that I use the djUser.firstName successfully to mention the
person's name, but can not use djUser.id as a value in a XML tag attribute
(VoiceXML var tag.)

It returns <var expr="" name="djUser.id" /> I need it to return <var
expr="1" name="djUser.id" />  So, how do I fix this?


Code:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="djUser.id"/>
<xsl:param name="djUser.firstName"/>


<xsl:template match="user">

<vxml version="2.0">

    <var name="djUser.id" expr="{@...}"/>

    <form id="getEntry">
        <block name="welcome">

              <prompt>
                Hello, <xsl:value-of
select="$djUser.firstName"/><xsl:apply-templates/>, what would you like to
do today?
              </prompt>


Current Thread
Keywords
xml
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor