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 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
R JSubject: Wildcard Processing on Nodes
Author: R J
Date: 27 Sep 2005 04:49 PM
Hey All. I'm trying to do a wildcard value of select on a node and I was wondering if anyone can help. The Product Image will be numbered from 1 to x but in my target XML file I'd like to have it in a replicant tag, <ProductImage>

I have the source XML file:

<ProdDetail>
<hiddenprodid><![CDATA[2986554]]></hiddenprodid>
<ProductImage1><![CDATA[image1.jpg]]></ProductImage1>
<ProductImage2><![CDATA[image2.jpg]]></ProductImage2>
</ProdDetail>

Then the XSL File:
<xsl:template match="/">
<accessoryProduct>
<accessoryDescription>
<defaultDescription>
<xsl:value-of select="*ProdDetail/ProductImage*"/>
</defaultDescription>
</accessoryDescription>
</accessoryProduct>
</xsl:template>
</xsl:stylesheet>

I'm trying to do a wildcard search on the product image. Any ideas?
Also, I'll be doing a batch transformation on this (found a script on here that works great, without the wildcards though).


Postnext
Ivan PedruzziSubject: Wildcard Processing on Nodes
Author: Ivan Pedruzzi
Date: 27 Sep 2005 10:33 PM

<xsl:value-of select="ProdDetail/*[contains(local-name(), 'ProductImage')]"


Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Posttop
R JSubject: Wildcard Processing on Nodes
Author: R J
Date: 28 Sep 2005 04:01 PM
Wicked! Will give it a try. Thanks!

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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.