[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Outputing PDF

Subject: Re: Outputing PDF
From: Alice Wei <ajwei@xxxxxxxxxxx>
Date: Tue, 4 Dec 2007 07:30:03 -0500
Re:  Outputing PDF
Hi,

  I cannot really tell you how to do it specifically, but here is
something you might want to check out:
http://www.perfectxml.com/XSLFO.PDF

Good luck.

Quoting Lucas Gongalves Grossi <lggrossi@xxxxxxxxxx>:

Hi everybody,

I have this xsl that is outputing an html. I wanna know how can I
output a PDF.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8"/>

<xsl:template match="/">
	<html><head></head>
	<script>
	function ativaSubMenus(quem){
	    var uls = quem.getElementsByTagName('ul')
	    for(var i=0; i&lt;uls.length; i++){
	        uls[i].style.display = 'none';
	    }

	    var h3s = quem.getElementsByTagName('h4')
	    for(i=0; i&lt;h3s.length; i++){
	        h3s[i].style.MozUserSelect = 'none';
	        h3s[i].unselectable = 'on';
	        h3s[i].style.cursor = 'pointer';
	        h3s[i].onclick = function(e){
	            var source = getSource(e);
	            var ulatual = source.parentNode.getElementsByTagName('ul')[0];
	            if(ulatual.style.display=='none'){
	                ulatual.style.display = 'block';
	            }else{
	                ulatual.style.display = 'none';
	            }
	        }
	    }
	}
	function bodyOnReady(func){
	    if(!(document.body==null)){
	        func();
	    }else{
	        var func_rep = func;
	        setTimeout(function(){ bodyOnReady(func_rep) },100);
	    }
	}

	function getSource(evt){
	    if(typeof(evt)=='undefined') var evt=window.event
	    source = evt.target?evt.target:evt.srcElement
	    if(source.nodeType == 3)source = source.parentNode
	    return source;
	}


bodyOnReady(function(){ ativaSubMenus( document.getElementById('menuzao') ) }) </script> <body> <ul id='menuzao'> <li><h4><xsl:value-of select="gqmroot/@titleRoot"/></h4> <ul> <xsl:for-each select="gqmroot/goal"> <li><h4><xsl:value-of select="@titleGoal"/></h4></li> <ul> <xsl:for-each select="question"> <li><h4><xsl:value-of select="@titleQuestion"/></h4></li> <ul> <xsl:for-each select="metric"> <li><xsl:value-of select="@titleMetric"/></li> <xsl:value-of select="unparsed-text(@ChartLink)" disable-output-escaping="yes"/> </xsl:for-each>

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

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

	        </ul>
	    </li>
	</ul>
	</body></html>
</xsl:template>

Thanks,
LUCAS





Alice Wei MIS 2008 School of Library and Information Science Indiana University Bloomington

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.