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
Related
I'm little lost here. I'm using googltest framework and just want to transform the xml report to an html. I found that xsltproc does the job:
xsltproc style.xsl report.xml -o report.hmtl
but first I need to get a stylesheet. Just a basic-generic stylesheet so the result can be visualized on a browser, where can I find it?
Firstly, you've tagged this XSLT 2.0, but xsltproc only supports XSLT 1.0.
Secondly, without knowing what flavour of XML is in report.xml, there isn't really very much one can do by way of a useful generic transformation to HTML. There are attempts like this one:
Generic XSLT to tabluate XML
but whether it produces results that work for you depend entirely on your input and desired output, which you haven't told us anything about.
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.
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.
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.
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,