XSLT: Computing the name of a generated element

Discussion in 'XML' started by Manuel Collado, Nov 4, 2003.

  1. I want to generate an element tag with the name of the parent of the
    actual node. I've tried:

    <xsl:element name="name(..)">
    and <xsl:element name="../name()">

    But the generated output is:

    <name(..)> ... </name(..)>
    or <../name()> ... </../name()>

    So the specified element's 'name' is taken literally. Is there a way to
    get it computed, instead of being a fixed literal?

    Thakns,
    --
    To reply by e-mail, please remove the extra dot
    in the given address: m.collado -> mcollado
     
    Manuel Collado, Nov 4, 2003
    #1
    1. Advertisements

  2. Manuel Collado wrote:
    > I want to generate an element tag with the name of the parent of the
    > actual node. I've tried:
    >
    > <xsl:element name="name(..)">
    > and <xsl:element name="../name()">
    >
    > But the generated output is:
    >
    > <name(..)> ... </name(..)>
    > or <../name()> ... </../name()>
    >
    > So the specified element's 'name' is taken literally. Is there a way to
    > get it computed, instead of being a fixed literal?


    name="{some expression}"
    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
     
    Johannes Koch, Nov 4, 2003
    #2
    1. Advertisements

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. =?iso-8859-1?B?bW9vcJk=?=
    Replies:
    7
    Views:
    1,134
    Roedy Green
    Jan 2, 2006
  2. Moonbeam66
    Replies:
    2
    Views:
    536
    Moonbeam66
    Jun 7, 2005
  3. Lenny
    Replies:
    2
    Views:
    453
    Lenny
    Jul 14, 2005
  4. HANM
    Replies:
    2
    Views:
    1,513
    Joseph Kesselman
    Jan 29, 2008
  5. Jeff Kish
    Replies:
    4
    Views:
    1,063
    Martin Honnen
    Oct 30, 2008
  6. optical supercomputing

    Optical Computing: special issue - Natural Computing, Springer

    optical supercomputing, Dec 19, 2008, in forum: C Programming
    Replies:
    0
    Views:
    565
    optical supercomputing
    Dec 19, 2008
  7. optical supercomputing

    Optical Computing: special issue - Natural Computing, Springer

    optical supercomputing, Jan 16, 2009, in forum: C Programming
    Replies:
    0
    Views:
    581
    optical supercomputing
    Jan 16, 2009
  8. Replies:
    6
    Views:
    384
Loading...