An example using EXSLT func:script in Firefox - firefox

Can anyone point me to an actual complete example of using EXSLT func:script in a xslt file that works on Firefox (so if my XML file had a xml-stylesheet instruction it would transform the xml file into HTML using an external js file)?
Thanks in advance.

That is not possible as the XSLT processor implementation in Mozilla/Firefox does not support that EXSLT feature. The only EXSLT features supported by Mozilla are listed on https://developer.mozilla.org/en-US/docs/EXSLT.

Related

YAML to HTML Eclipse plugin

There are lot of Swagger related codegens to convert a YAML to HTML file , but is there an eclipse plugin available which can open or convert a YAML to HTML ?
I have searched in multiple places but there's no place where we can find such a plugin .Plugins like Yedit help seeing a YAML in colour syntax form but not as a HTML ?
You might want to take a look at RepreZen API Studio, available as a standalone desktop application or as an Eclipse plugin.
It includes swagger-codegen and other open source generators, which can create various forms of HTML documentation from your YAML-formatted Swagger-OpenAPI spec. Code generation is fully integrated into the IDE, but can also be run from the command line or CI/CD automated builds.
To clarify, there's no HTML "equivalent" of a Swagger-OpenAPI spec, or any other form of YAML. So it's not a simple matter of converting one file format to another. But there are various components that render a machine-readable OpenAPI spec, in YAML or JSON form, in a user-friendly HTML documentation format, often with integrated sandbox testing.
One of these is Swagger-UI, and it's included in the HTML formats that are supported by RepreZen API Studio. I hope that helps.

Debugging XSLT in Chrome

I'm having trouble with an XSL translation in Chrome. I was wondering if there any tools that would allow me to step through the style sheet to see where the problem is.
Use node tests to check the results of XPath queries.
Use the document function to test file paths
Use the JavaScript console to run XPath queries on the XML data source
Use inline templates instead of xsl:include to eliminate path issues
Use comments to eliminate xsl:include statements referencing buggy templates
Use processing-instructions to comment blocks of code that have XML comments
Use an embedded stylesheet to workaround same-origin policy restrictions
Use input tags to print xsl:variable values.
Use attribute value templates to print unknown values
Use simplified stylesheets and parameterized XPath to modularize templates
Use Opera as a cross-reference, since it shows line numbers in its XSLT error messages.
On linux there is a tool called xsltproc which takes an XSL and XML and outputs the transform.
It also shows context around errors.
I've found this most useful when I'm developing as I can test the result of my changes without the need to have a development server up and running. It just works.
However, I've noticed that the results of the transform can differ from that of Chrome for example. I don't know why this is, whether my transform was non-conforming, if Chrome is non-conforming, or if xsltproc is non-conforming.
EDIT My comment about differences between Chrome and xsltproc rendering the transform slightly differently is likely invalid.
I had modified the XML schema somewhat, and since then, xsltproc was generating tags (based on type name of types in the schema) correctly, but Chrome was not.
I was doing hard reloads to avoid Chrome reusing the cache.
I could tell Chrome was using the new xsl as there was other changes included that were being rendered.
Only the schema related tests were not working in Chrome for some reason.
I've since found that now it is magically working, with no changes to the xsl, just on a different day.
So I guess some part of the xsl was being cached somehow (perhaps just the schema bit - totally guessing here)... hence why some debugging in Chrome would be super nice.

Where can I get SCAYT documentation, or algorithm?

I am using CK editor, now I want to understand SCAYT, but the scayt plug-in provided by SPellchecker.net is minified, and not well documented but I need to understand some of the features.
Can anyone provide me with such type of document or any algorithm related to this.
thanks in advance.
Download CKEditor 3.0.2 from http://ckeditor.com/download.
Decompress the file, and look for the directory _source/plugins/scayt, which will contain a file named plugin.js.
That file is not minified.

online pdf generation

I'm looking to create PDF files instantly online given user input in my html/php page.
are there any FREE API's out there that will allow me to do this?
various options, here are a couple:
Prince XML
wkhtmltopdf
TCPDF
HTML2PDF
PDF converter
PDFSharp
pdflib
formatter coverters
Php uses the PDFlib library, it has a lot of pdf functions, check it out here http://php.net/manual/en/book.pdf.php
You could probably use pdflib
Hi You have two or three approaches:
1) If you can work with XML, that is, the source of your PDF file is in XML format, you could use XSL and XSL:Fo to generate the PDF. XSL and Fo are declarative languages so you can control the PDF layout external to your application. Fo creates only documents, not interactive forms.
2) If you can work in Java, you could use iText to generate the PDF using a jar/api. There is also iTextSharp for C#. Using iText, you can also create PDF Forms, not just documents.
3) If you have XHTML and just want to create PDFs that look like your HTML pages, there are several options - just search the web for HTML to PDF converters.
If your pdf isn't overly complex, you should look into XFDF before making an architectural decision. The main benefit to this approach is that there is no need to store pdf's in the db or on hard drive. Additionally, I have seen many pdf generation implementations that use home grown batch processes that are buggy and only create another 'moving part' in an application. If you have very complex pdf needs and don't mind the overhead of storing the pdfs, pdflib is a good choice.

Is it possible to wikify Visual Studio XML comments?

Is it possible to generate a set of wiki pages from XML comment file generated by Visual Studio?
I'm talking about something like Sandcastle, but for wiki format instead of compiled CHM.
Edit: I'm using MediaWiki which can import/export articles in XML. So I hope that it is possible to write a transformation converting XML comments to MediaWiki XML.
I'd recommend a bit different solution:
Use Help Server to publish .CHM/.HxS on the web
Use special MediaWiki templates to link reference from Wiki like here.
Use <see href="..."> to link Wiki pages from XML comments
See also: FiXml
This is not exactly what you wanted, but I hope this will be helpful.
If the items mentioned above do not suffice, have you tried to simply build your own XSLT transform into the wiki markup of your choice?
You can write a simple application in .NET (or pick your platform of choice) to transform the doc XML format to wiki XML format. You'd still have to keep the wiki updated with the output files manually.

Resources