xsl-list
[Top] [All Lists]

Re: [xsl] XSL-T should naturally loop? not grabbing all the children node-sets..

2008-04-22 09:03:40


If I run your orignal stylesheet I get

 saxon loop.xml loop.xsl paraCatagory=c2_products


 

        <div class="cat_block">
   <div class="cat_module">sub-Category c2_sub1<br>
<a href="/products/c2_products/c2_sub1_products">
<img src="/imagesEdp/default_sm.jpg">
</a>
</div>
</div>



As I mentioned xsl:value-of (and attribute value templates) in xslt 1.0
just give the string value of the first node.

It's possible to fix that but if you change xsl:version to 2.0 and use
an xslt 2 processor you get

saxon9 loop.xml loop.xsl paraCatagory=c2_products             




        <div class="cat_block">
   <div class="cat_module">sub-Category c2_sub1 sub-Category c2_sub2 
sub-Category c2_sub3<br>
<a href="/products/c2_products/c2_sub1_products 
/products/c2_products/c2_sub2_products /category/c2_products/c2_sub3_products">
<img src="/imagesEdp/default_sm.jpg /imagesEdp/default_sm.jpg 
/imagesEdp/default_sm.jpg">
</a>
</div>
</div>


With all the values put in the same href, which presumably is not really
what you want.
if you said what output you do want given your original document and a
parameter of paraCatagory=c2_products  then probably someone could
supply some working code.

David

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--