XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
aprameya dharaSubject: xml report query
Author: aprameya dhara
Date: 06 Jul 2008 08:39 PM
Hi!
I am tyring to create an xml report (for xsl-fo). How can i construct the report so that the field associated with an xml element is created only if the xml element is found.

currently if the xml element is not found, then the field is still displayed on the report with no value inside it.

in xslt, i achieved this though the use of xsl:if statement to check the presence of the xml element.

thanks in advance,

best regards,

apz

Postnext
Ivan PedruzziSubject: xml report query
Author: Ivan Pedruzzi
Date: 06 Jul 2008 10:29 PM
Originally Posted: 06 Jul 2008 10:28 PM
Hi Aprameya,

In this situation you should change the XPath condition to filter out empty elements, see attached image.

In addition, XML Publisher allows to define an "if" container (right click -> Insert If) where you can define an arbitrary XPath expression.

Hope this helps
Ivan Pedruzzi
Stylus Studio Team


Unknownxmlreport-withFilter.png

Postnext
aprameya dharaSubject: xml report query
Author: aprameya dhara
Date: 11 Jul 2008 08:52 AM
Hi!

i am tryin to add a condition for the if statement but with no luck. please find attached an image file which illustrates what i am doing, I want the cell (which is mapped to /report/headerSection/leftLogo ) to be present only if /report/headerSection/leftLogo node is present in the xml.

if the node is not present in the xml, then it should display only 2 cells.

many thanks!


Imageuntitled.JPG

Postnext
Ivan PedruzziSubject: xml report query
Author: Ivan Pedruzzi
Date: 11 Jul 2008 11:44 AM


Is your intent to generate a table with just a single row or multiple rows with a variable number of columns?


Thanks
Ivan

Posttop
aprameya dharaSubject: xml report query
Author: aprameya dhara
Date: 15 Jul 2008 10:28 AM
Originally Posted: 11 Jul 2008 08:02 PM
hi,

to generate a table with variable number of columns and multiple rows

cheers

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.