|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: problems with xslt on "open" catalog-formats like
Hayk, Matthias wrote:
I am dealing with a product catalog delivered in the xml-standard ecXML 3.0 from Requisite. From this product catalog i want to create a dynamic web-navigation with to select our different products with a web-client. One specific item on that xml-format is, that using that xml-format you can design your own structure for your catalog. to achieve this, the attributes for a product are not fix xml-elements, which are declared in a dtd or schema-file. all "own" attributes are stored in key/value elements to a product.
Use as
<xsl:for-each select="key('items-by-length','100')>
<xsl:value-of select="KEYVALUE[KEY='price']/VALUE"/>
</xsl:for-each>Note that the above will not work on the XML you supplied with the mail because of the whitespace surrounding all values. <KEY> Suplier Name </KEY>
Note that normalize-space may have the unwanted side effect of normalizing spaces within keys and values too. J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








