'state' in xsl program

Discussion in 'XML' started by Mike@miscanthus.net, Sep 14, 2004.

  1. Guest

    I am using xsl to transform xml templates to xml. The templates can
    contain scalar and list 'macros'. If a list is encountered I need to
    duplicate the subtree and apply one of the list's values (once for each
    value).

    Scalars and lists are represented in xml in-line in the xsl.

    It seems like the best approach is to apply-templates to the twig that
    needs replicating. The problem is that for this to work I need to
    change the twig's state such that what was a list is now a scalar.

    With a bit of code I can create a local copy of the state and tweak the
    value of the list item to its current scalar value.

    Two questions:
    1) is there a better approach? (This can't be an original idea, are
    there any links to other impls?)
    2) is there a simpler way to maintain state during node recursion?
    Thanks for the help.

    --Mike
     
    , Sep 14, 2004
    #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. Kevin Flood
    Replies:
    0
    Views:
    1,040
    Kevin Flood
    Sep 8, 2004
  2. Kevin Flood
    Replies:
    1
    Views:
    2,792
    Kevin Flood
    Sep 13, 2004
  3. Klaus Friese
    Replies:
    0
    Views:
    488
    Klaus Friese
    Nov 22, 2004
  4. Ray Tayek
    Replies:
    3
    Views:
    530
    Ray Tayek
    Nov 30, 2003
  5. Replies:
    1
    Views:
    3,651
    A. Bolmarcich
    May 27, 2005
Loading...

Share This Page