How to create XSD document from an XSLT? - 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.

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

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.

Is there a free C++ xsl-fo to PDF engine?

Is there an xsl-fo to PDF engine written in C++ that can be used in QT?
The engines I have come across so far are in java.
You should use QXmlQuery: link
From qt docs:
Running an XSLT stylesheet is like running an XQuery, except that when you construct your QXmlQuery, you must pass QXmlQuery::XSLT20 to tell QXmlQuery to interpret whatever it gets from setQuery() as an XSLT stylesheet instead of as an XQuery. You must also set the input document by calling setFocus().
Code:
QXmlQuery query(QXmlQuery::XSLT20);
query.setFocus(QUrl("myInput.xml"));
query.setQuery(QUrl("myStylesheet.xsl"));
query.evaluateTo(out);
where "out" is pdf file. and xsl file define how to trasform your xml file to pdf.

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.

Any good XSLT sheets for XML to PDF?

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,