Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > A question on the xsl.

Reply
Thread Tools

A question on the xsl.

 
 
Adelard
Guest
Posts: n/a
 
      12-15-2003
Here is my xsl and xml, I want the xml node: LABEL3 ( General
Information ) to move under the ROW when viewing or printing this PDF
Document.

How can I do it?

Thanks




Here is my xsl code:
-------------------


<xsl:stylesheet xmlnssl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xml.apache.org/fop/extensions">
<xslutput method="xml" encoding="UTF-8"/>

<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="8.5in" page-width="11in" margin-top="0.5in"
margin-left="0.5in" margin-bottom="0.5in" margin-right="0.5in">
<fo:region-before extent="0in"/>
<fo:region-body margin-top="0in" margin-left="0in"
margin-bottom="0in" margin-right="0in"/>
<fo:region-after border-before-style="solid"
border-width="1pt" extent="5mm" display-align="before"/>
</fo:simple-page-master>
</fo:layout-master-set>

<xsl:apply-templates select="EC-REPORT"/>



</fo:root>
</xsl:template>






<xsl:template match="EC-REPORT">
<foage-sequence master-reference="simple">

<fo:static-content flow-name="xsl-region-before"/>
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center" font-size="8pt">
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
table-layout="fixed"

<fo:table text-align="center" >
<fo:table-column column-width="3in"/>
<fo:table-column column-width="4in"/>
<fo:table-column column-width="3in"/>


<fo:table-body>



<fo:table-row>
<fo:table-cell>
</fo:table-cell>
<fo:table-cell>
<fo:block line-height="19pt"
font-weight="bold" font-size="10pt" text-align="center">
<xsl:value-of
select="TITLE-HEADER/CENTER/LABEL1"/>
</fo:block>
</fo:table-cell>


</fo:table-row>

<fo:table-row>

<fo:table-cell>
</fo:table-cell>
<fo:table-cell>
<fo:block line-height="19pt"
font-weight="bold" font-size="10pt" text-align="center">
<xsl:value-of
select="TITLE-HEADER/CENTER/LABEL2"/>
</fo:block>
</fo:table-cell>
</fo:table-row>




<fo:table-row>
<fo:table-cell>
<fo:block line-height="19pt"
font-weight="bold" font-size="12pt" text-align="left">
<xsl:value-of select="TITLE-HEADER/LEFT/LABEL3"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
</fo:table-cell>
</fo:table-row>


</fo:table-body>

</fo:table>

<xsl:apply-templates/>



</fo:flow>
</foage-sequence>
</xsl:template>












<xsl:template match="SUB_REPORT">
<xsl:apply-templates select="HEADER"/>
<xsl:apply-templates select="ROW"/>
</xsl:template>


<xsl:template match="HEADER">
<fo:block line-height="15pt" font-size="10pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always">
<fo:inline white-space-collapse="false"/>
</fo:block>

<fo:table text-align="center" table-layout="fixed">
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.9in"/>


<fo:table-body>

<fo:table-row>

<fo:table-cell border-bottom-width="thin"
border-bottom-style="double" border-bottom-color="#000000"
background-color="#FFFFFF">
<fo:block line-height="11pt" color="#000000"
font-size="8pt" space-before.optimum="1.5pt"
space-after.optimum="1.5pt" keep-together="always" text-align="center"
wrap-option='wrap' overflow='auto'>
<xsl:value-of select="PART-NAME-"/>
</fo:block>
</fo:table-cell>


<fo:table-cell border-bottom-width="thin"
border-bottom-style="double" border-bottom-color="#000000"
background-color="#FFFFFF">
<fo:block line-height="11pt" color="#000000" font-size="8pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always" text-align="center" wrap-option='wrap'
overflow='auto'>
<xsl:value-of select="PART-REVISION-"/>
</fo:block>
</fo:table-cell>






</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>



<xsl:template match="ROW">
<fo:table text-align="left" table-layout="fixed">
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.9in"/>

<fo:table-body>

<fo:table-row>


<fo:table-cell>
<fo:block line-height="11pt" color="#000000" font-size="8pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always" text-align="left" wrap-option='wrap'
overflow='auto'>
<xsl:value-of select="PART-NAME-"/>
</fo:block>
</fo:table-cell>


<fo:table-cell>
<fo:block line-height="11pt" color="#000000" font-size="8pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always" text-align="left" wrap-option='wrap'
overflow='auto'>
<xsl:value-of select="PART-REVISION-"/>
</fo:block>
</fo:table-cell>






</fo:table-row>

</fo:table-body>
</fo:table>
</xsl:template>







</xsl:stylesheet>




Here is my xml below:
--------------------



<?xml version="1.0" encoding="UTF-8"?>
<EC-REPORT>
<TITLE-HEADER>
<CENTER>
<LABEL1>ROCKWELL COLLINS, INC.</LABEL1>
</CENTER>
<CENTER>
<LABEL2>ENGINEERING CHANGE ORDER (ECO)-</LABEL2>
</CENTER>
<LEFT>
<LABEL3>GENERAL INFORMATION</LABEL3>
</LEFT>




</TITLE-HEADER>
<REPORT>
<SUB-REPORT>
<HEADER>
<PART-NAME->Part Name </PART-NAME->
<PART-REVISION->Part Revision
</PART-REVISION->

</HEADER>
<ROW>
<PART-NAME->ASE</PART-NAME->
<PART-REVISION->A</PART-REVISION->

</ROW>
<ROW>
<PART-NAME->asoo</PART-NAME->
<PART-REVISION->A</PART-REVISION->

</ROW>

</SUB-REPORT>
</REPORT>
</EC-REPORT>
 
Reply With Quote
 
 
 
 
Baldo
Guest
Posts: n/a
 
      12-16-2003
> <?xml version="1.0" encoding="UTF-8"?>
> <EC-REPORT>
> <TITLE-HEADER>
> <CENTER>
> <LABEL1>ROCKWELL COLLINS, INC.</LABEL1>
> </CENTER>
> <CENTER>
> <LABEL2>ENGINEERING CHANGE ORDER (ECO)-</LABEL2>
> </CENTER>
> <LEFT>
> <LABEL3>GENERAL INFORMATION</LABEL3>
> </LEFT>
>
>
> </TITLE-HEADER>
> <REPORT>
> <SUB-REPORT>
> <HEADER>
> <PART-NAME->Part Name </PART-NAME->
> <PART-REVISION->Part Revision
> </PART-REVISION->
>
> </HEADER>
> <ROW>
> <PART-NAME->ASE</PART-NAME->
> <PART-REVISION->A</PART-REVISION->
>
> </ROW>
> <ROW>
> <PART-NAME->asoo</PART-NAME->
> <PART-REVISION->A</PART-REVISION->
>
> </ROW>
>
> </SUB-REPORT>
> </REPORT>
> </EC-REPORT>



xsl:copy-of select="EC-REPORT/REPORT/SUB-REPORT/ROW[position()=1]/PART-NAME"
xsl:copy-of select="EC-REPORT/REPORT/SUB-REPORT/ROW[position()=1]/PART-REVISION"
xsl:copy-of select="EC-REPORT/TITLE-HEADER/LEFT/LABEL3"

is that u want?
 
Reply With Quote
 
 
 
 
Adelard
Guest
Posts: n/a
 
      12-16-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Baldo) wrote in message news:<(E-Mail Removed). com>...
> > <?xml version="1.0" encoding="UTF-8"?>
> > <EC-REPORT>
> > <TITLE-HEADER>
> > <CENTER>
> > <LABEL1>ROCKWELL COLLINS, INC.</LABEL1>
> > </CENTER>
> > <CENTER>
> > <LABEL2>ENGINEERING CHANGE ORDER (ECO)-</LABEL2>
> > </CENTER>
> > <LEFT>
> > <LABEL3>GENERAL INFORMATION</LABEL3>
> > </LEFT>
> >
> >
> > </TITLE-HEADER>
> > <REPORT>
> > <SUB-REPORT>
> > <HEADER>
> > <PART-NAME->Part Name </PART-NAME->
> > <PART-REVISION->Part Revision
> > </PART-REVISION->
> >
> > </HEADER>
> > <ROW>
> > <PART-NAME->ASE</PART-NAME->
> > <PART-REVISION->A</PART-REVISION->
> >
> > </ROW>
> > <ROW>
> > <PART-NAME->asoo</PART-NAME->
> > <PART-REVISION->A</PART-REVISION->
> >
> > </ROW>
> >
> > </SUB-REPORT>
> > </REPORT>
> > </EC-REPORT>

>
>
> xsl:copy-of select="EC-REPORT/REPORT/SUB-REPORT/ROW[position()=1]/PART-NAME"
> xsl:copy-of select="EC-REPORT/REPORT/SUB-REPORT/ROW[position()=1]/PART-REVISION"
> xsl:copy-of select="EC-REPORT/TITLE-HEADER/LEFT/LABEL3"
>
> is that u want?



Hi Baldo,

When I view or print the PDF Document, the node LABEL3 should come
below the HEADER and ROW.
Currently, "GENERAL INFORMATION" of the node LABEL3 comes above the
HEADER, if you use my current xsl and xml to view or print the PDF
Document.

In brief, I want to customize my xsl to reflect that.

Thanks
Adelard
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question row filter (more of sql query question) =?Utf-8?B?YW5kcmV3MDA3?= ASP .Net 2 10-06-2005 01:07 PM
Quick Question - Newby Question =?Utf-8?B?UnlhbiBTbWl0aA==?= ASP .Net 4 02-16-2005 11:59 AM
Question on Transcender Question :-) eddiec MCSE 6 05-20-2004 06:59 AM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
Syntax Question - Novice Question sean ASP .Net 1 10-20-2003 12:18 PM



Advertisments