Reading output xml in the same XSLT, which perform the transformation

Discussion in 'XML' started by titusjava@yahoo.com, May 19, 2005.

  1. Guest

    I am having a XSLT which transforms an input XML to transformed XML.
    I want to get the count of some nodes in the transformed XML, in the
    same XSLT.
    Is it do able?. Is it possible to read Output XML, in the same XSLT
    which perform the transformation.
     
    , May 19, 2005
    #1
    1. Advertising

  2. wrote:

    > I am having a XSLT which transforms an input XML to transformed XML.
    > I want to get the count of some nodes in the transformed XML, in the
    > same XSLT.
    > Is it do able?. Is it possible to read Output XML, in the same XSLT
    > which perform the transformation.


    Only with an extension function which converts a result tree fragment to
    a nodeset. You would store the result tree fragment in a variable and
    then use
    count(exsl:node-set($variable))
    see
    <http://www.exslt.org/exsl/functions/node-set/index.html>

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, May 19, 2005
    #2
    1. Advertising

  3. No xxx:node-set() extension function is necessary in XSLT 2.0 as there's no
    RTF type there.

    Cheers,
    Dimitre Novatchev

    "Martin Honnen" <> wrote in message
    news:428cb0d0$0$25679$-online.net...
    >
    >
    > wrote:
    >
    >> I am having a XSLT which transforms an input XML to transformed XML.
    >> I want to get the count of some nodes in the transformed XML, in the
    >> same XSLT.
    >> Is it do able?. Is it possible to read Output XML, in the same XSLT
    >> which perform the transformation.

    >
    > Only with an extension function which converts a result tree fragment to a
    > nodeset. You would store the result tree fragment in a variable and then
    > use
    > count(exsl:node-set($variable))
    > see
    > <http://www.exslt.org/exsl/functions/node-set/index.html>
    >
    > --
    >
    > Martin Honnen
    > http://JavaScript.FAQTs.com/
     
    Dimitre Novatchev, May 19, 2005
    #3
    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. clogwog
    Replies:
    0
    Views:
    433
    clogwog
    Oct 20, 2004
  2. Blue Gecko
    Replies:
    1
    Views:
    453
    Blue Gecko
    Oct 3, 2005
  3. pradeep gummi
    Replies:
    3
    Views:
    977
    pradeep gummi
    Aug 13, 2003
  4. Matt Bradbury
    Replies:
    3
    Views:
    463
    Dimitre Novatchev
    Aug 21, 2003
  5. Binaryx
    Replies:
    3
    Views:
    5,170
    Peter Flynn
    Apr 14, 2012
Loading...

Share This Page