473,385 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

xsl:value-of not working

178 100+
Hi,

Im not sure if im doing this right but when I create my pdf the values do not show where ive used xsl:value-of.

My xml is generated from php and im using apache fop
[HTML] <?xml version="1.0" encoding="ISO-8859-1" ?>
- <quote>
- <company>
<comp_name>Bio Bubble</comp_name>
<contact />
- <address>
<add1>Emsworth Yacht Harbour</add1>
<add2>Thorney rd</add2>
<town>Emsworth</town>
<county>Hampshire</county>
<pcode>PO10 8BP</pcode>
</address>
<tel>0044 1243 370 100</tel>
</company>
- <details>
<proj_id>j8888</proj_id>
<proj_name>STPs for UAE</proj_name>
<form>FORM 4 type 2</form>
<access>Front Only</access>
<cable_entry>Bottom</cable_entry>
<ip>00</ip>
<fault>50Ka 1sec 800a</fault>
<proj_manager>Mark Cleary</proj_manager>
<deadline>10/10/08</deadline>
</details>
- <objects>
- <obj id="894">
<object_name>A1</object_name>
<module_name>Incoming 600x600</module_name>
<mod_desc>Incomer connection section 600x600</mod_desc>
<obj_desc />
<xpos>180</xpos>
<ypos>210</ypos>
<height>600</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="895">
<object_name>A2</object_name>
<module_name>400A SINGLE MCCB 600X600</module_name>
<mod_desc>400A SINGLE MCCB 600X600</mod_desc>
<obj_desc />
<xpos>180</xpos>
<ypos>150</ypos>
<height>600</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="896">
<object_name>B2</object_name>
<module_name>22 - 45KW CONV ASD 600X600</module_name>
<mod_desc>22 - 45KW CONV ASD 600X600</mod_desc>
<obj_desc />
<xpos>240</xpos>
<ypos>150</ypos>
<height>600</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="897">
<object_name>B1</object_name>
<module_name>22 - 45KW CONV ASD 600X600</module_name>
<mod_desc>22 - 45KW CONV ASD 600X600</mod_desc>
<obj_desc />
<xpos>240</xpos>
<ypos>90</ypos>
<height>600</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="898">
<object_name>cable1</object_name>
<module_name>Cable</module_name>
<mod_desc>Standard 400mm cable section</mod_desc>
<obj_desc>[object]</obj_desc>
<xpos>300</xpos>
<ypos>90</ypos>
<height>1800</height>
<width>400</width>
<depth>600</depth>
</obj>
- <obj id="899">
<object_name>A3</object_name>
<module_name>0 - 3KW CONV VSD 600X600</module_name>
<mod_desc>0 - 3KW CONV VSD 600X600</mod_desc>
<obj_desc />
<xpos>180</xpos>
<ypos>90</ypos>
<height>600</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="900">
<object_name>B3</object_name>
<module_name>0 - 5.5KW DOL 600x400</module_name>
<mod_desc>0 - 5.5KW DOL 600x400</mod_desc>
<obj_desc />
<xpos>240</xpos>
<ypos>210</ypos>
<height>400</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="901">
<object_name>C1</object_name>
<module_name>90KW VSD 600X1800</module_name>
<mod_desc>90KW VSD 600X1800</mod_desc>
<obj_desc />
<xpos>340</xpos>
<ypos>90</ypos>
<height>1800</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="902">
<object_name>D1</object_name>
<module_name>3 - 7.5KW CONV VSD 600X600</module_name>
<mod_desc>3 - 7.5KW CONV VSD 600X600</mod_desc>
<obj_desc />
<xpos>400</xpos>
<ypos>90</ypos>
<height>600</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="903">
<object_name>D2</object_name>
<module_name>14WAY DIST BOARD 600X600</module_name>
<mod_desc>ACTUATED VALVE 14WAY DIST BOARD 600X600</mod_desc>
<obj_desc />
<xpos>400</xpos>
<ypos>150</ypos>
<height>600</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="904">
<object_name>D3</object_name>
<module_name>Spare 600x400</module_name>
<mod_desc>Spare section 600x400</mod_desc>
<obj_desc />
<xpos>400</xpos>
<ypos>210</ypos>
<height>400</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="904">
<object_name>D3</object_name>
<module_name>SPARE 600x400</module_name>
<mod_desc>Spare 600x400</mod_desc>
<obj_desc />
<xpos>400</xpos>
<ypos>210</ypos>
<height>400</height>
<width>600</width>
<depth>600</depth>
</obj>
- <obj id="905">
<object_name>cable2</object_name>
<module_name>Cable</module_name>
<mod_desc>Standard 400mm cable section</mod_desc>
<obj_desc>[object]</obj_desc>
<xpos>460</xpos>
<ypos>90</ypos>
<height>1800</height>
<width>400</width>
<depth>600</depth>
</obj>
</objects>
</quote>[/HTML]

Heres my xsl
[HTML]<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="A4"
page-height="29.7cm" page-width="21.0cm" margin="2cm">
<fo:region-body/>
</fo:simple-page-master>
<fo:simple-page-master master-name="A3"
page-height="29.7cm" page-width="21.0cm" margin="5cm">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Helvetica" font-size="18pt" text-align="end">
<html>
<body>
<xsl:value-of select="quote/company"/>
</body>
</html>
</fo:block>
<fo:block font-family="Helvetica" font-size="12pt" text-align="end" space-after="36pt">
aa:<xsl:value-of select="quote/company/company_name"/>
</fo:block>
<fo:block text-align="end">
<fo:external-graphic src="file:tes_logo.gif" width="50%" height="50%"/>
</fo:block>
<fo:block text-align="end">
A Catcode Production
</fo:block>


<!-- Nextpage: Table of contents-->
<fo:block break-before="page" space-before="2in" space-after="2in">
Index Page
</fo:block>


<!-- Nextpage: Quote-->
<fo:block break-before="page" space-before="2in" space-after="2in">
Quote
</fo:block>

<!-- Nextpage: Drawings of each panel-->
<fo:block break-before="page" space-before="2in" space-after="2in">
Drawings
</fo:block>

<!-- Nextpage: Company profile-->
<fo:block break-before="page" space-before="2in" space-after="2in">
Company Profile
</fo:block>

<!-- Nextpage: Terms and conditions of quote-->
<fo:block break-before="page" space-before="2in" space-after="2in">
Terms and Conditions
</fo:block>

</fo:flow>

</fo:page-sequence>



</fo:root>
</xsl:template>
</xsl:stylesheet>[/HTML]
Oct 14 '08 #1
2 2649
Dormilich
8,658 Expert Mod 8TB
- found one error
Expand|Select|Wrap|Line Numbers
  1. // change
  2. <xsl:value-of select="quote/company/company_name"/>
  3. // to
  4. <xsl:value-of select="quote/company/comp_name"/>
- I'm not sure if <xsl:value-of select="quote/company"/> does what you intend
- why do you need a html block in a print layout?

despite that the xsl stylesheet was doing fine.

regards
Oct 14 '08 #2
cleary1981
178 100+
yeah I just seen that error myself. Thats all it was. thanks
Oct 14 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Christian Roth | last post by:
Hello, when using this "identity" processing sheet: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="iso-8859-1" /> ...
2
by: Christoph Niemann | last post by:
Hello, I want to output an element with an attribute. The attribute's value shall contain a entity reference. Is that possible at all? I use this source-XML and xsl-stylesheet: <?xml...
4
by: Figo 775 | last post by:
Hi, I have an xml document which is as below: <?xml version="1.0" encoding="UTF-8"?> <fragment name="htmlPart"> <value>&lt;table&gt; &lt;tr&gt;&lt;td&gt;&lt;b&gt;Feature&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b &gt;Benefit&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;...
4
by: Tjerk Wolterink | last post by:
I've xml code like this: roles.xml: <?xml version="1.0" encoding="ISO-8859-1"?> <roles xmlns="http://www.wolterinkwebdesign.com/xml/roles"> <!-- ! The admin role. ! And admin should have...
0
by: Korol | last post by:
I need to pass some value from XSL to javascript. For the reasons it is inpossible to use xsl:param and xsl:variable. There is some ‘if’ conditions in XSL that would modify that value. I create id...
1
by: MikeC | last post by:
For ASP.Net/C Sharp I have an XML file and an associated XSL file. I am using the System.Web.UI.Controls.Xml control to render the resulting HTML. This seems to work fine with one slight...
2
by: Beniamin Tecar | last post by:
Hi, I have an xml : <DataRecords> <Point Alias='A' Value='1' Status='0' /> <Point Alias='B' Value='2' Status='0' /> </DataRecords> I have needed by an XSL to insert a node between...
6
by: Kourosh | last post by:
I can't figure out how to do this because the tags have to be properly nested... and I dont have much XSL experience. Say I'm generating an HTML tag in my XSL file, and for one of it's attributes,...
4
by: eric.goforth | last post by:
Hello, I'm getting: msxml3.dll (0x80004005) Error while parsing "file:///c:/WWWROOT/includes/Inc.xsl". A name was started with an invalid character. When I put in the "{$sDisabledString}"
0
by: vaibhavk | last post by:
Hi, I am trying to transform a XML file into another XML using XSL (XSLT1.0): Original XML: <pfe-traffic-statistics> <pfe-input-packets>5678</pfe-input-packets>...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...

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.