473,466 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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.

Jul 20 '05 #1
2 1239


ti*******@yahoo.com 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/
Jul 20 '05 #2
No xxx:node-set() extension function is necessary in XSLT 2.0 as there's no
RTF type there.

Cheers,
Dimitre Novatchev

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:42***********************@newsread2.arcor-online.net...


ti*******@yahoo.com 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/

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dimitre Novatchev | last post by:
You seem to be unaware of the xslt processing which uses the built-in rules in the absence of templates that match some selected node. http://www.w3.org/TR/xslt#built-in-rule According to the...
5
by: Marcel Akkerman | last post by:
Hi, Does anyone have a clue how to reduce the number of nodes using XSLT? When outputing all nodes in order I could just use <xsl:for-each select="name"> But what if I, besides sorting and...
4
by: Mike Conmackie | last post by:
Hi Folks, I've probably omitted something very basic but I have no idea what it might be. The results of my transformation _should_ be an xml file but all I get is the xml declaration...
5
by: Mike Judkins | last post by:
I'm looking for examples of websites (preferably large and well known companies, not personal sites or developer-to-developer sites) that use XML and XSLT as a technology platform from which to...
2
by: Zhou Lei | last post by:
Hello I have transformed the XML to XHTML document and would like to validate the output, how can I save the XML output result (XHTML)? I transform it on client side. And the server-side...
1
by: KwiKiwi | last post by:
Hey, I'm doing a series of XSL Transformations from a C#.NET Console app. I've designed a .xsl file (to output to "text" not "xml") to generate a text file with entries that look like: ...
6
by: Christopher | last post by:
I am currently in the process of evaluating the performance hits of moving to the .NET platform for our application. I created a sample project that loads the transforms the same XML and XSLT in...
1
by: SteveB | last post by:
I'm porting an application from Apache Xerces to .Net and am having a couple of small problems with deserialization. The XML that I'm reading comes from a variety of sources, and there are two...
3
by: super.raddish | last post by:
Greetings, I am relatively new to, what I would call, advanced XSLT/XPath and I am after some advice from those in the know. I am attempting to figure out a mechanism within XSLT to compare the...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.