Brian,

select="intellispec/aliases/alias" is different than 
select="//*[local-name()='intellispec/aliases/alias'], if not functionally, at 
least in the area of performance.  Just try 
select="intellispec/aliases/alias[position() < 3]" and see if that works any 
better.

BTW, this has nothing to do with FOP and is completely up to the XSLT processor 
you're using.

-Sean

-----Original Message-----
From: Brian Trezise [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 18, 2008 3:41 PM
To: [email protected]
Subject: Use only a limited number of items in an xsl:for-each

I'm using the following to select a subset of items from my xml document to be 
rendered to the pdf; however when I run fop on the xslt/xml, nothing is 
rendered at all:

<xsl:for-each
select="//*[local-name()='intellispec/aliases/alias'][position() &lt; 3]">
        <xsl:value-of select="."/>
</xsl:for-each>

>From what I can tell this is valid xslt code, is there another way I need to 
>write this to be compatible with FOP 0.95?  Or does FOP not support this 
>functionality and I need to limit the number of aliases elsewhere in my 
>software?

sample xml code:

<intellispec>
        <aliases>
                <alias>C0805C101J8GAC7800</alias>
                <alias>IPUHPIOUSOPIHJPOIA</alias>
                <alias>ASIJPCNEPOIWJPOIYO</alias>
        </aliases>
</intellispec>

I've attached a sample pdf that is generated by my xslt; up top where it says 
"aka" two of the three aliases should follow on the same line.  If I just do 
select="intellispec/aliases/alias" in the above for-each all three aliases 
print out as expected.


Thanks,
___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
22288 E Princeton Dr
aurora, colorado 80018
T: 720.524.4864
[EMAIL PROTECTED]

----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to