Any good XSLT sheets for XML to PDF? - xslt

Does anyone know of a solid non-encumbered suite of XSLT sheets that can generate PDF via an XSL transform?
I really like XSL transforms, I use them to make HTML output from dbms's.
Now I have some data in a DBMS that I like to generate PDF output from. I've not written a dbms to XML script yet for this data, so I have no commitment to any given set of XML tags.
Thanks in advance!

Depends on your XML. If you have, e.g., Docbook, look at David Pawson's site, for HTML IBM has a nice example over at developerWorks. Both go the way of XML -> via XSLT -> XSL-FO -> via Apache FOP -> PDF.
Cheers,

Related

how to generate a report out of an xml

I am trying to generate a report out of below xml
I need the below csv output
Can you share some ideas on the better design with xslt 2.0
Thanks,
Vicky

XSL display embedded pdf from xml source

I have an xml document which contains embedded pdf documents in base64 format. I'm using xsl:fo to create a pdf view of the xml, however I have absolutely no idea how to display the embedded documents as part of the overall output using xsl. Could someone help here please. Apologies if this is a very simple question, however I'm brand new to XSL and cannot seem to find any example of this anywhere.
PDF documents are vector images in some sense, and thus can be embedded into PDF output of an XSL FO rendering engine -- so far the first page only.
RenderX XEP accepts data: as URI schema for embedded images, so a base64 encoded PDF file placed as a string to fo:external-graphic/#src should work fine:
src="url('data:application/pdf;base64,encodedpdffilegoeshere...')"

DTD validation before XSLT transformation

I have to write an XSLT to convert a XML file into another XML file. The original input file has to valid with respect to a DTD. Is there a way in which XSLT can validate the input xml file against the DTD before converting it ? Also reject the input file if it does not conform to the DTD.
Also , I will run the XSLT in a tool like Oxygen XML Editor.
Thanks in advance.
JK
You have to do this through your XSLT processor. I don't think there is a way to do this in XSLT itself.
In oXygen, you can go to "XML / XSLT-FO-XQuery / XSLT / Saxon / Saxon-HE/PE/EE" in Preferences and turn DTD validation on or off (there is a combo box).
Not with builtin XSLT-1.0 functions (which cannot detect non-well-formedness in a clean manner either). Your environment may be able to provide this through other tools such as DOM Builders.
This depends entirely on the tool you are using. In this case, this is a question about the Oxygen editor. There's nothing in the specification for XSLT that requires a processor to perform DTD validation when reading XML.

How to create XSD document from an XSLT?

I have an XSLT, now i need to create a new XSD document from that xslt.
Please any one help.
As far as I understand you already have this flow
input XML --> XSLT --> output XML
Now its not clear if you want to creat the XSD for the input or output xml.
There are many tools which will help you in generating XSD schema from a given XML.
Here is one of those you can try online: click here
You can of course google for more or if you want to download a desktop version.

create droplet app. to transform xml with xslt

I want to create a application, where you drop a xml doc on it, and an xslt transformation occurs using saxon as the transform engine. The result is a text file.
I am doing this on a mac. Does anyone know where I could find a beginner tutorail to approach this??
Thanks,
Ian
At sourceforge, take a look at the saxon resource zip file, it contains example applications for saxon.