xsl-list
[Top] [All Lists]

Re: Sibling or Node manipulation

2005-09-27 15:50:03
Hey Jay,

Thank you and sorry for the private reply!

S.E.

--- JBryant(_at_)s-s-t(_dot_)com wrote:

Siarom sent me a private follow-up to ask me how to
go about creating that 
table. I then replied in private. Since then, I have
thought of a better 
solution (that one was more verbose and required a
node-set extension or 
XSLT 2.0). And this time, I remembered to send my
reply to the list, so 
that it can get into the archives.

Here's my better solution:

  <xsl:template match="customersRepInfo">
    <fo:block><xsl:value-of
select="criLine[1]"/></fo:block>
    <fo:table table-layout="fixed">
      <fo:table-column column-width="3in"/>
      <fo:table-column column-width="3in"/>
      <fo:table-body>
        <fo:table-row>
          <fo:table-cell>
            <fo:block><xsl:value-of
select="criLine[3]"/></fo:block>
          </fo:table-cell>
          <fo:table-cell>
            <fo:block><xsl:value-of
select="criLine[2]"/></fo:block>
          </fo:table-cell>
        </fo:table-row>
      </fo:table-body>
    </fo:table>
    <fo:block><xsl:value-of
select="criLine[4]"/></fo:block>
    <fo:block><xsl:value-of
select="criLine[5]"/></fo:block>
  </xsl:template>

Note that this solution relies on the criLine nodes
always being in the 
same order. If they appear in different orders,
you'll need to figure out 
how to distinguish a date from a name from a title
and so on. If you have 
any control over the incoming XML, you'd be much
better served to give 
each criLine a distinct name.

HTH

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




JBryant(_at_)s-s-t(_dot_)com 
09/27/2005 03:21 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] Sibling or Node manipulation






One way is to use a table that has one row and two
cells, one cell for the 

date and one for the "Your Signature" block.

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




siarom egrub <egrubs(_at_)yahoo(_dot_)com> 
09/27/2005 03:04 PM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


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

Subject
[xsl] Sibling or Node manipulation






I have the following XML 

<customersRepInfo>
  <criLine>Your Name (Print):</criLine>
  <criLine>Your Signature:</criLine>
  <criLine>Date:</criLine>
  <criLine>Your Job Title:</criLine>
  <criLine>Telephone Number:</criLine>
</customersRepInfo>

How can I get the "Date:" line to aligned across
from
(horizontal to) the "Your Signature:" line my output
PDF file? 

I have this tried

<xsl:template match="customersRepInfo">
 <xsl:for-each select="criLine">
    <fo:block space-before="3mm" font-size="4.8mm">
                  <!--xsl:apply-templates/-->
                  <xsl:value-of
select="preceding-sibling::*
[2]."/>  <!--This doesn't display the
"Telephone Number:" line--->
                  <!--<xsl:value-of select="."/>-->
<!--Displays all
the lines in same order as XML--->
                  <fo:leader leader-length="3in"
leader-pattern="rule"/>
    </fo:block>
  </xsl:for-each>
</xsl:template>

but without the solution that I want.


Thanks in advance for your help!

~S.E.



 
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
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>
--~--





--~------------------------------------------------------------------
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>
--~--



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