Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to change an XML file to a modified XML file via an XSLT file and XSLT processing tool.
For example: xsltprocess.exe -src a.xml -dest b.xml -xslt c.xslt
Can anyone assist me?
If you are looking for an XSLT processor you can use Saxon: http://saxon.sourceforge.net/
You can see the command line options here: http://saxon.sourceforge.net/saxon6.5.1/using-xsl.html
Microsoft has a simple command line tool that wraps their XML Parser - http://www.microsoft.com/en-us/download/details.aspx?id=21714.
As #Mathias said though, it only supports XSL 1.0 while Saxon supports XSL 2.0.
To run the convertor you downloaded from the given URL run this command
msxsl.exe backEnd.xml inspectcode.xslt -o backEnd.html
This will tranform the xml file using the xslt file into the output file in html format
You can use AltovaXML XSLT 1.0/2.0 engine (also well-formedness and validity checking). There is free of charge community edition with direct (I mean without Java) command line interface e.g.:
AltovaXML.exe -xslt2 stylesheet.xsl -in input.xml -out output.xml
Check AltovaXML.chm help file for usage.
# xsltproc [options] stylesheet file
This program is the simplest way to use libxslt.
http://xmlsoft.org/XSLT/xsltproc2.html
ftp://xmlsoft.org/libxml2/
The Win32 directory has a lot of goodies, next to precompiled binaries for use on commandline.
I'm not linking to the directory directly, since the root of the project has a rich set of tools for - good for everyone's flavor of the month :)
There are lots of XSLT 1.0 processors available, and a handful of XSLT 2.0 processors, and as far as I know every single one of them runs on Windows and can be called from the command line. If your problem is choosing between them, then you're going to have to tell us more about your requirements and constraints.
You can find some XSLT engine wrappers, XSLer and XSLTransform (one in Delphi and one in .NET) with source code at https://github.com/zoomicon/tranXform
XQSharp includes an XSLT 2.0 command line processor. See the Xslt Command Line Reference documentation for details.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I would like to generate code documentation (C#, .net4) to MS Word file (.doc, .docx). This is not because I think it is better, but because it is easier to version control when compared to a set of HTML docs.
I am looking into the possibility and practicality of this and weighing the options.
I see doxygen can produce RTF documents. There is nothing wrong with doxygen, I just want to know if there is anything else out there (paid or not) to make sure I have weighed a few different options.
Edit: Just in case it isn't clear, I would like to create documentation of the summery comments in my C# code. Visual Studio exports this to XML already. Tools like doxygen inspects the code files them self. I want to convert these comments to Word docs.
You can try our VSdocman. It can generate various formats, including RTF, of the summary XML comments.
The code documentation is XML, right? This fellow says that you can open an XML document in Word by choosing "open with transform" from the Open dialog box. Apparently that prompts to you provide information that is then used to generate an XSLT. It seems like you could use this as the basis for your own XSLT if you want to persist it?
This detailed article about XML comments in Visual Studio also suggests using XSLT to display the XML on a web page. So, you could just as well import that XML into your Word document
SoftArtisan's OfficeWriter can programmatically create .doc and .docx files via a .NET API. It's pretty rad, check it out.
DISCLAIMER: I'm one of the engineers who built the latest version.
I would like to generate code documentation (C#, .net4) to MS Word file (.doc, .docx). This is not because I think it is better, but because it is easier to version control when compared to a set of HTML docs.
You should generate the documentation in whatever format you think is most helpful for users of your software.
Your code is presumably in version control. You can generate the XML with the API help directly from the code, and you can generate the help file itself (with whatever tool, in whatever format) from this XML. These output files don't necessarily need to be in version control at all.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is anyone aware of command line tools that can validate CSS and/or HTML?
The W3C offers its validators for local installation, with directions to use from the command line, but the installation process is a nightmare for anyone who isn't a seasoned Java developer.
I've searched with Google, but can't find anything.
Ideally I'd like to use a tool (or tools) that I can point at my CSS, and have it report back on any errors. I want it to be local to increase the speed of my debugging cycles.
Ideally, the tools will understand HTML5 and CSS3.
There is tidy for HTML. It's more than a validator: it doesn't only check if your HTML is valid, but also tries to fix it. But you can just look at the errors and warnings and ignore the fix if you want.
I'm not sure how well it works with HTML5, but take a look at Wanted: Command line HTML5 beautifier, there are some parameter suggestions.
For CSS there is CSSTidy (I have never used it though.)
Regarding the W3C validator: if you happen to use debian/ubuntu, the package w3c-markup-validator is in the repositories and very easy to install via package management. Packages for other distos are also available.
And the W3C CSS validator is available as a jar, which is easy to use:
java -jar css-validator.jar http://www.w3.org/.
One of the most popular web-based validators is http://validator.nu.
On their About page, they list a command-line script (written in Python) for validation.
On Ubuntu, you can install the package w3c-markup-validator. It provides a CGI web interface. But you do not have to use it.
You can use my w3c-validator-runner to run the validator without having a webserver.
If that does not work, consider starting a webserver. You can then use srackham/w3c-validator.
WC3 has the source to their validators here: https://github.com/w3c
Although not directly a solution to your problem, you could consider using a CSS-extension framework for the validation part. I use SASS extensively in all my web projects and find it indispensible when you get used to it. Besides all the fancy mixins and variables features etc. it will also perform a validation of your CSS/SASS markup and report for errors as it is perfectly backwards compatible with regular CSS3. The nice thing is that it works as a Ruby Gem which means that it runs locally and can be integrated with other workflows through either Ruby or the command line (terminal in unix environment).
Take it for a spin: http://sass-lang.com/docs/yardoc/
Run sass style.scss and see what happens.
Not sure if this works but if you have Node & NPM there is: html-validator and html-validator-cli https://github.com/zrrrzzt/html-validator & https://github.com/zrrrzzt/html-validator-cli
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 9 months ago.
Improve this question
I am looking for a nice way to generate a nested site structure in ruby. I want something that I can propose to clients instead of msword documents. Something of the form:
Home/
index.txt
About.txt
Services/
index.txt
products.txt
blahblah.txt
with the .txt files being markdown, or whatever.
I actually want to import this into a cms system, and just want to hook into whichever static-site generator that I can use.
Otherwise I will do it myself, but it would be nice to use something else for integration with html preprocessors etc.
Take a look at Jekyll
there is also middleman for generating static sites
How about either of
Ace
nanoc
webby or
StaticMatic?
The simplest of those I have seen is Stacey, though it does not run static content, it generates it on the fly, and its in PHP, but yeah it's just files and folders, even if you drop images or videos or pdf's on the folder they will be managed and added automatically. And they are just .txt files. http://www.staceyapp.com/
But, if I had to choose a static compiler in Ruby I'd go with nanoc. It's the most powerful and flexible I've seen and once you configure it with the rules and such, it's just files and folders too.
There is also Stasis, I haven't tried it but it seems pretty good.
http://stasis.me/
Here's a gist featuring the most popular ones: https://gist.github.com/2254924
Monkeyman (Scala) supports markdown and SCAML, the Scala version of SCAML. It will basically copies and transforms a folder structure, in any way you like. Without any processing it will copy the structure as is, but it has a slew of decorators that not only are able to transform the content, but also the location to anything you like.
It doesn't support compass, SASS or any of that yet (although being based on Scalate, it probably does transform coffeescript embedded into the template pages, but I haven't tried that.)
DocPad works quite well. It supports a broad range of preprocessors.
Let's check my open source static file CMS it's taken markdown or HTML files from directory structure and generates HTML files.
It's written in Nodejs (source codes) and it's very flexible - you can choose to use React, Nunjucks or plain javascript for templates
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Short version
We need a Maven Doxia alternative being able to generate good looking PDFs (at least code snippets should be properly indented and have configurable font size). Maven guys proposed maven-pdf-plugin in DOXIA-419, but it has same problems. Aforementioned DOXIA-419 has details on difficulties we've experienced with Doxia.
Detailed version
We develop a BIG product providing Java/C/C++/C#/etc API. Tens of client-customized branches are maintained/developed simultaneously.
We need a tool to facilitate automatic document generation meeting these requirements:
Include arbitrary snippets from Java/XML/etc samples.
Confluence Snippet Plugin is a good example of this feature.
Generate good looking printable documents (e.g. PDF).
Generate online documents having clickable cross-references etc (e.g. HTML).
Unattended mode (e.g. should be easy to run document generation process from Ant script).
Documentation source content (from which PDFs/etc are later generated) should be kept in a human-readable easy-to-diff format.
Documentation source content should be kept in separate files (not Java sources).
Support (Java/xml/etc) syntax highlighting.
UPDATE:
8. Windows OS compatibility.
My open source project Dexy might work for you. It's an authoring tool rather than an automatic document-generation tool, so it's not like JavaDoc which creates a whole structure automatically. Source code and document content are kept separate, syntax highlighting support is very good, document snippets are available. I use LaTeX for good looking printable documents, but you could use any other text-based format that compiled to PDF if you preferred that. Re the clickable cross references, you'd have to write HTML templates which could then be populated automatically (I'm doing so now, replacing JavaDoc on a project). You can also run live code examples and include this output in your documentation.
http://dexy.it
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What tools are you guys using for XPath and why?
Right now I'm using
SketchPath because its totally awesome, but its a windows app that needs to be installed
WhiteBeam online XPath test bedbecause you can test expressions from the website
SketchPath seems to stand out the most to me because it actually helps you create the xpath and it is very advanced. If you haven't tried it you should.
Cons to SketchPath: you have to install it on the machine, otherwise it is fantastic.
Cons to WhiteBeam: you have to upload your file which I don't always want to do for security reasons and the file size you can upload has some limit on it, and uploading a file is annoying anyways. Also I think there might be some subtle differences between the xpath used for that tool and when running a .NET app. But don't remember any right now. Just keep it in mind.
[Update] XMLQuire was originally recommended in this answer. It was a free XML editor for Windows with the SketchPath XPath Editor built in for XPath testing.
XMLQuire has not been maintained for a few years and has now been retired.
For XPath experimentation etc. XMLQuire's author now recommends the XPath Notebook extension for Visual Studio Code. Developed by the same author, this now supports XPath 3.1 courtesy of Saxonica's Saxon-JS processor.
If you're in a web dev environment, Firefox has a number of great tools for XPath support and analysis:
Firebug has built-in XPath support
XPath Checker I have found to be great
and also maybe of use:
XPath Runner
FireXPath
Be careful with Firebug - the right-click "copy XPath" command copies the path as all lower-case, and some XML parsers (like the MXSML parser used in FinalBuilder) are case-sensitive - so you'll need to correct the casing of your Firebug-copied XPath statement otherwise your parser won't find any matching nodes.
with this xpath tester you can test standard XPath expressions
You can also save your XPath's and XMLs at any point of time to return to it later or post a link in web or email, which is a really handy feature.
SketchPath is the best tool for XPath that I have used so far. I have used oXygen as well, but prefer SketchPath to oXygen for XPath.
I like XPather, a Firefox plugin. It's simple and easy-to-use and it's not a separate program to run as long as you have Firefox running which is when and where I'm usually using XPath.
I use oXygen for xpath work. It's rather easy to test your expression against xml on file. You set the target xml file once and then it's just a button to click to test your expression.