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. Advertising

  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. 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. Moonbeam66
    Replies:
    2
    Views:
    454
    Moonbeam66
    Jun 7, 2005
  2. HANM
    Replies:
    2
    Views:
    767
    Joseph Kesselman
    Jan 29, 2008
  3. optical supercomputing

    Optical Computing: special issue - Natural Computing, Springer

    optical supercomputing, Dec 19, 2008, in forum: C Programming
    Replies:
    0
    Views:
    449
    optical supercomputing
    Dec 19, 2008
  4. optical supercomputing

    Optical Computing: special issue - Natural Computing, Springer

    optical supercomputing, Jan 16, 2009, in forum: C Programming
    Replies:
    0
    Views:
    473
    optical supercomputing
    Jan 16, 2009
  5. Replies:
    6
    Views:
    211
Loading...

Share This Page