Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Problem with XSL loop

Hi,
I've not been working with XML/XSL for long and I've hit a snag. I'm trying to fill out a table with info from my XML. Usually, I'd use 'xsl:for-each', but on this occasion I can't. Here is the XML:






Brian
28
Red
Pizza


Steven
42
Cerise
Baby poo


Raymond
2
Blue
Fish guts


Tam
35
Green
Beef crisps






And here is the XSL transform I have so far:


<?xml version="1.0"?>















Name Age Colour Smell Select










Tick here to select










Any help would be greatly appreciated. Thanks in advance

Hellza

Comments

  • infidelinfidel Posts: 2,900Member
    : Hi,
    : I've not been working with XML/XSL for long and I've hit a snag. I'm trying to fill out a table with info from my XML. Usually, I'd use 'xsl:for-each', but on this occasion I can't. Here is the XML:
    :
    :
    :
    :
    :
    :
    : Brian
    : 28
    : Red
    : Pizza
    :
    :
    : Steven
    : 42
    : Cerise
    : Baby poo
    :
    :
    : Raymond
    : 2
    : Blue
    : Fish guts
    :
    :
    : Tam
    : 35
    : Green
    : Beef crisps
    :
    :
    :
    :
    :
    :
    : And here is the XSL transform I have so far:
    :
    :
    : <?xml version="1.0"?>
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    NameAgeColourSmellSelect
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    : Tick here to select
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    : Any help would be greatly appreciated. Thanks in advance

    What is the problem and why can't you use an xsl:for-each?


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • hellsgatehellsgate Posts: 3Member
    Thanks for replying Infidel,

    I couldn't use xsl:for-each as the table I was building was inside a template. However, I've managed to get it running ok now, so once again, thanks for taking the time to have a look at the problem in the first place.

    Hellsgate
  • infidelinfidel Posts: 2,900Member
    : Thanks for replying Infidel,
    :
    : I couldn't use xsl:for-each as the table I was building was inside a template. However, I've managed to get it running ok now, so once again, thanks for taking the time to have a look at the problem in the first place.

    I don't understand why xsl:for-each wouldn't work for you, but if it's working now then that's what counts.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

Sign In or Register to comment.