XML Nanny goes open source.

January 27th, 2008

XML Nanny is now an open source project (BSD license) on Google Code!

XML Nanny 3.0 Beta 1

January 30th, 2007

XML Nanny icon

Download XML Nanny 3.0 Beta 1

I’ve ported the work I did on the TeXMLMate plug-in back to XML Nanny. For now, I’m calling it version 3.0 beta 1. New Features (for XML Nanny) include:

  • Vastly reduced application file size — XML Nanny.app has gone from more than 20 MB to about 1 MB in size. This is due to jettisoning Xerces C++. XML Nanny 3.0 is based entirely on libxml2 — and is much better for it.
  • Open in external editor is much improved — now you can configure your preferred external editor. Clicking on error items in XML Nanny’s result view will open the document or schema with the error selected.
  • XML Catalog support - Look under Window -> XML Catalog menu
  • More XML Parser config settings
  • Improved Schematron support
  • View parsed XML — see what the XML Parser sees.
  • Improved stability and more

More on RNG bugs in Nanny

July 20th, 2006

Looks like parsing any remote source doc while validating with RNG or RNC when using XML Nanny will cause a crash. Kinda embarassing, but I guess I didn’t test that! :(

Doing a RNG or RNC validation of a local source doc works fine.

This is definitely a Nanny bug, not a libxml2 bug. Hope to have a 2.0.1 bug fix release by the weekend.

RNC bugs

July 18th, 2006

XML Nanny 2.0’s RELAX NG compact syntaxt (RNC) support is provided by using Trang to transform the specified RNC file into a temporary RELAX NG XML syntax file (RNG), and then validating against that. XML Nanny is supposed to do a lastModified check on the RNC each time you parse to detect whether it needs to regenerate a new temporary RNG file.

Looks like there is a bug that cuases XML Nanny to occassionally not generate the temp RNG when it should. I will fix this in a 2.0.1 release soon. In the meantime, if you’re doing RNC validation, and don’t see the results you expect, you might try deleting ~/Application Support/XMLNanny/schema.rng and try the parse again.

In related news, XML Nanny is crashing on an Atom RNC file sent in by Bill Humphries. It appears that libxml2 is choking on the generated RNG, but I’m not positive about that. The Atom.rnc file contains some embedded Schematron assertions… wouldn’t be surprised if libml2’s RELAX NG impl didn’t support that. But I’ve tried removing the embedded Schematron, and the crash still ocurrs… So I’ll continue to investigate…

XML Nanny 2.0 Released

July 17th, 2006

I’m very proud to announce version 2.0 of XML Nanny, my free Mac OS X desktop app for parsing and validating XML documents locally or on the Web. XML Nanny is powered by libxml2 and Xerces-C++ and provides validation support for DTD, WXS, Schematron, and RELAX NG compact and XML syntaxes. See the ‘About’ tab for a full list of new features in 2.0.

Thanks again go to Glenn Martin for his help in making XML Nanny 2.0 a Universal Binary.

XML Nanny 2.0 Beta 4 Released

July 11th, 2006

Universal Binary

Thanks to Glenn Martin for helping make XML Nanny a Universal Binary.

Other fixes include improved stability, improved “Open in external editor” behavior, and a fix for a consistent crasher when XML Nanny encountered an empty attribute value while doing a Xerces-C-based parse.

This will probably be the final beta before a full release.

The biggest task left now is documentation… the UI has several new features, and although they’re failry self-explanatory, I don’t have any documentation for the new features… I’d like to work that up before calling this a final release.

XML Nanny 2.0 Beta 3 Released

July 8th, 2006

XML Nanny 2.0 screenshot

XML Nanny 2.0 is a complete rewrite (shudder) of XML Nanny, with tons of sexy new features:

  • RELAX NG Support. Use XML Nanny to validate XML instance documents against RELAX NG schemas in both XML and compact syntax!
  • Schematron 1.5 Support. Use XML Nanny to validate instance docs against Schematron schemas with assertions, reports, pattern tests, and diagnostic information reported throught the UI.
  • Specify XSD, RNG and RNC files through the UI. So far, you can’t do this for DTDs… for those you still need to embed a DOCTYPE in your instance doc.
  • Specify your desired validation type (None, DTD, WXS, RNG, RNC or schematron) through the UI.
  • Verbose Parsing mode provides intimate instance doc/DTD details through the UI… kinda like a visual SAX parser.
  • Saved parse settings to .nanny files. This is XML Nanny’s answer to bookmarking. Set up an XML Nanny window with your parse settings and save them to disk for use later or for sharing with friends!
  • Open errors in source document in BBEdit for editing. Now you can click on an error or warning item in the XML Nanny result list to open the source document in BBEdit with the error highlighted. In the future, we will generalize this to use of the external editor of your choice.
  • Mime-type and encoding values sent to XML Nanny from a web server via HTTP headers are now reported.
  • Internal DTD subsets now supported (a nasty bug in XML Nanny 1.0 would cause a crash on encountering an internal subset).
  • XML Namespace setting allows you to parse with namespaces on or off.
  • Full-Contstraint Check setting for XSD parsing.
  • Change result text size using command-+ and command-minus.

FAQ

Upon which XML toolkits is XML Nanny built?

So which toolkit is used where?

When using XML Nanny, if you do a non-validating parse, a DTD-validating parse or an XSD-validating parse, you are using Xerces-C++. If you do a RELAX NG-validating parse of either type your are using libxml2’s xmlTextReader. If you do a Schematron-validating parse you are using NSXML and the Schematron XSLT reference implementation.

So why are libxml2 and Xerces-C++ used rather than just libxml2?

Cos I started out using Xerces-C++ since I prefer C++ to straight C. But when I wanted to add RELAX NG support, I had to move to libxml2. Perhaps in the future we will add a feature for selecting a specific parser in the UI. Let me know if you would like this.

Why is libxml2.framework bundled with XML Nanny.app when libxml2 is already available on Mac OS X Tiger?

Cos the version of libxml2 (2.2.16 I think) that ships with Tiger has some RELAX NG bugs that have been fixed in 2.2.26. So 2.2.26 is bundled.

How is RELAX NG compact syntax supported? Did you write an RNC parser?

Hell no. XML Nanny uses Trang from the command line in the background to generate an RNG from your RNC. XML Nanny checks the RNC’s last modification date to make sure it only generates a new RNG if necessary.

XML Nanny is a free (as in beer) Cocoa application for Mac OS X Tiger that allows you to parse and validate local or remote XML documents against DTD, W3C XML Schema, RELAX NG, and Schematron schemas.

XML Nanny 2.0 has added many new features:

  • RELAX NG Support. Use XML Nanny to validate XML instance documents against RELAX NG schemas in both XML and compact syntax!
  • Schematron 1.5 Support. Use XML Nanny to validate instance docs against Schematron schemas with assertions, reports, pattern tests, and diagnostic information reported throught the UI.
  • Specify XSD, RNG and RNC files through the UI. So far, you can’t do this for DTDs… for those you still need to embed a DOCTYPE in your instance doc.
  • Specify your desired validation type (None, DTD, WXS, RNG, RNC or schematron) through the UI.
  • Verbose Parsing mode provides intimate instance doc/DTD details through the UI… kinda like a visual SAX parser.
  • Saved parse settings to .nanny files. This is XML Nanny’s answer to bookmarking. Set up an XML Nanny window with your parse settings and save them to disk for use later or for sharing with friends! :)
  • Open errors in source document in BBEdit for editing. Now you can click on an error or warning item in the XML Nanny result list to open the source document in BBEdit with the error highlighted. In the future, we will generalize this to use of the external editor of your choice.
  • Mime-type and encoding values sent to XML Nanny from a web server via HTTP headers are now reported.
  • Internal DTD subsets now supported (a nasty bug in XML Nanny 1.0 would cause a crash on encountering an internal subset).
  • XML Namespace setting allows you to parse with namespaces on or off.
  • Full-Contstraint Check setting for XSD parsing.
  • Change result text size using command-+ and command-minus.