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

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

  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. 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. clogwog
    Replies:
    0
    Views:
    523
    clogwog
    Oct 20, 2004
  2. Blue Gecko
    Replies:
    1
    Views:
    610
    Blue Gecko
    Oct 3, 2005
  3. pradeep gummi
    Replies:
    3
    Views:
    1,168
    pradeep gummi
    Aug 13, 2003
  4. Matt Bradbury
    Replies:
    3
    Views:
    591
    Dimitre Novatchev
    Aug 21, 2003
  5. Wolfgang
    Replies:
    2
    Views:
    992
    Wolfgang
    Apr 9, 2004
  6. Wolfgang
    Replies:
    0
    Views:
    519
    Wolfgang
    Apr 6, 2004
  7. Kevin Brown
    Replies:
    3
    Views:
    764
    Kevin Brown
    Aug 28, 2004
  8. Binaryx
    Replies:
    3
    Views:
    5,779
    Peter Flynn
    Apr 14, 2012
Loading...