xsl-list
[Top] [All Lists]

RE: xls:for-each not working

2005-04-01 13:03:38
Hi, Josh,

If you don't succeed this time around, post more of your stylesheet next 
time. When I see a named template go by with no other context, I often 
wonder whether part of the problem isn't being caused by whatever code 
calls the named template. Also, I strongly suspect that your problem could 
be more easily solved by XSLT's usual processing model of matching 
templates and the apply-templates statement rather than named templates.

In other words, I bet we can help you more if you show us more.

Jay Bryant
Bryant Communcation Services
(presently consulting at Synergistic Solution Technologies)




josh higgins <doopsterus(_at_)yahoo(_dot_)com> 
04/01/2005 01:56 PM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


To
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
cc

Subject
RE: [xsl] xls:for-each not working






ok fellaz thanks!  I will give it a shot! Thanks!!!

--- Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
A path expression starting with "/" selects from the
root of the document.
You have written:

               <xsl:for-each select="/invoice/detail/row">
                               <fo:block>
                                               <xsl:value-of 
select="/transaction_detail"/>
                               </fo:block>

               </xsl:for-each> 

You want to select the transaction_detail as a child
of the row, so leave
out the "/".

Michael Kay
http://www.saxonica.com/


-----Original Message-----
From: josh higgins [mailto:doopsterus(_at_)yahoo(_dot_)com] 
Sent: 01 April 2005 20:47
To: xsl
Subject: [xsl] xls:for-each not working

I cannot get my for-each statement to work.  Am I
doing this incorrectly?   I am just wanting to
output
all of the data in the xml file that has a
<transaction_data> tag.  Here is my statement and
below is the sample xml.  I use this to attempt to
display my template <xsl:call-template
name="detail"/>
 Please help!

Thanks!
Josh

<xsl:template name="detail">
             <xsl:for-each select="/invoice/detail/row">
                             <fo:block>
                                             <xsl:value-of 
select="/transaction_detail"/>
                             </fo:block>

             </xsl:for-each> 
</xsl:template>

SAMPLE XML
<invoice>
<detail>
                             <row>
<line_sequence>1</line_sequence>
<transaction_detail>Activity for (620)
251-1559</transaction_detail>
<format_control>C1</format_control>
                                             <group_no>1</group_no>
                             </row>
                             <row>
<line_sequence>2</line_sequence>
                                             <group_no>1</group_no>
                             </row>
                             <row>
<line_sequence>3</line_sequence>
                                             <transaction_detail> 
Transaction
Activity</transaction_detail>
<format_control>C1</format_control>
                                             <group_no>1</group_no>
                             </row>
                             <row>
<line_sequence>4</line_sequence>
<format_control>U1</format_control>
                                             <group_no>1</group_no>
                             </row>
                             <row>
<line_sequence>5</line_sequence>
                                             <transaction_detail>  
Description</transaction_detail>
                                             <group_no>1</group_no>
                             </row>
                             <row>
<line_sequence>6</line_sequence>
                                             <transaction_detail>  


==============================================================
==============</transaction_detail>
                                             <group_no>1</group_no>
                             </row>
</detail>
</invoice>




__________________________________ 
Do you Yahoo!? 
Yahoo! Personals - Better first dates. More second
dates. 
http://personals.yahoo.com




--~------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--






--~------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>