Re: Nested XML

Discussion in 'XML' started by Johannes Koch, Jul 29, 2003.

  1. Mikael Olesen wrote:
    > My file is nested and look like this:
    > <BOOKS>
    > <SUBJECT>
    > <SUBJECTTEXT>Sub 1</SUBJECTTEXT>
    > <BOOK>
    > <TITLE>Bla. bla.</TITLE>
    > <WRITER>Bla. bla.</WRITER>
    > <BOOK>
    > <BOOK>
    > <TITLE>Bla. bla.</TITLE>
    > <WRITER>Bla. bla.</WRITER>
    > <BOOK>
    > <BOOK>
    > <TITLE>Bla. bla.</TITLE>
    > <WRITER>Bla. bla.</WRITER>
    > <BOOK>
    > </SUBJECT>

    [...]
    > </BOOKS>
    >
    > So for each subject there can be 1 or more books. And I need a subject
    > title for each subject. Can I do that? And how would the HTML look
    > like?


    Write templates for SUBJECT, SUBJECTTEXT, and BOOK. In the SUBJECT
    template you apply the template for SUBJECTTEXT, generate an HTML ul or
    ol, and, within that, apply templates for BOOK.
    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
     
    Johannes Koch, Jul 29, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Russ Perry Jr
    Replies:
    2
    Views:
    4,193
    Russ Perry Jr
    Aug 20, 2004
  2. Chad E. Dollins
    Replies:
    3
    Views:
    669
    Kai-Uwe Bux
    Nov 8, 2005
  3. request@no_spam.com
    Replies:
    5
    Views:
    444
  4. Ultrus
    Replies:
    3
    Views:
    391
    Stefan Behnel
    Jul 9, 2007
  5. Replies:
    3
    Views:
    480
    Victor Bazarov
    Dec 7, 2007
Loading...

Share This Page