473,804 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to set a limit when applying template

Hi

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

When using <xsl:apply-templates select="Documen t"I get 10 documents. How
can I limit it to only the first 5 documents, e.g. pseduo
<xsl:apply-templates select="Documen t[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="Documen t"I get 10 documents. How
can I limit it to only the first 5 documents, e.g. pseduo
<xsl:apply-templates select="Documen t[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
2218
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 transforming XML types based on their name. For example: <xsl:template match="user-address"> <xsl:element name="Addr"> <xsl:element name="Addr1"><xsl:value-of select="line-1"/></xsl:element>
5
1511
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 XSL, but I can't control the XML file. I basically want to apply my own template to a dynamic XML file that somebody else controls.
2
2019
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
31910
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 exception saying that the buffer is too big. I tried to set the tcpclnt.ReceiveBufferSize to the size of the buffer I"m trying to send, but the exception is still thrown, there is no transmit
6
4159
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
3708
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 lines in the output. Here is a simplified XML and XSLT: (Note the problem does not happen when testing in XMLSpy) - - - - - - - - - - - - - - - - - - - - - - - -
4
2107
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 limit(1000/day), How can I write python code to simulate the browser-like-activity to submit more than 10k queries in one day? applying for more than 10 licence keys and changing them if query-quota-exception raised is not a neat idea...
3
1836
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
1745
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+ sessions on the server and on the 6th one I want that to get blocked and tell the user that the server is busy pls try later or something like that. Can this be done? I am on .NET FW1.1. Thanks !
0
9708
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9588
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10085
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7625
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.