473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to set a limit when applying template

Hi

When using <xsl:apply-templates select="Document"I get 10 documents. How
can I limit it to only the first 5 documents, e.g. pseduo
<xsl:apply-templates select="Document[position() &lt; 6]">
Oct 8 '08 #1
2 2183
Hvid Hat wrote:
Hi

When using <xsl:apply-templates select="Document"I get 10 documents. How
can I limit it to only the first 5 documents, e.g. pseduo
<xsl:apply-templates select="Document[position() &lt; 6]">
the code you suggest is the code you want, did you try it?

--
http://dpcarlisle.blogspot.com
Oct 9 '08 #2
Hvid Hat wrote:
Hi

When using <xsl:apply-templates select="Document"I get 10 documents. How
can I limit it to only the first 5 documents, e.g. pseduo
<xsl:apply-templates select="Document[position() &lt; 6]">
the code you suggest is the code you want, did you try it?

David
--
http://dpcarlisle.blogspot.com
Oct 9 '08 #3

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

Similar topics

0
by: Lewis G. Pringle, Jr. | last post by:
Folks: I have some XML text I'm tranforming from one schema to another. Both schemas have their own notion of 'address' (as well as many other contepts). XSL seems to be mainly suited to...
5
by: Brad | last post by:
How do I apply my own template to an XML file that is hosted on another server? The only way I see to apply a template is to have the XML response include the instruction for loading the specific...
2
by: Thomas Sommer | last post by:
Hi, I think the following is not possible but maybe (hopefully) I am wrong: I have: <xsl:param name="test"> <tag1>asdfasdf</tag1> <tag2>asdfasdf</tag2> </xsl:param>
13
by: Sharon | last post by:
I'm using TcpClient and getting the Stream by: TcpClient tcpclnt = new TcpClient(); . . . Stream stm = tcpclnt.GetStream(); Now, when I'm trying to send a big buffer via stm.Write(...) I get an...
6
by: Tim Meagher | last post by:
Can anyone help me figure out how to apply a stylesheet to a pushbutton defined in the asp:BoundColumn or asp:EditCommandColumn elements of a datagrid?
3
by: Jeff Calico | last post by:
Hello everyone I am transforming an XML document to text, basically only outputting a small portion of it. When I run the following XSLT via Xalan's processor, I get a bunch of unwanted blank...
4
by: Per | last post by:
I am doing a Natural Language processing project for academic use, I think google's rich retrieval information and query-segment might be of help, I downloaded google api, but there is query...
3
by: tuka | last post by:
Hi, I have a problem I would like help solving: My xml: <node id=1> <nodeContent>xyz</nodeContent> </node> <node id=2>
7
by: Remote_User | last post by:
Hi All, I have my ASP.NET application hosted in COM+ and I have my client app. Is there any way I can limit the number os sessions? Say, I have 5 client requests and they instantiate 5 COM+...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.