What conventions (if any) do you use for indenting XSL code?
- how do you deal with really long, complicated XPaths
- can you plug them into your XML editor of choice?
- is there some open source code that does the job well?
For some background, I use nxml-mode in Emacs. For the most part its OK and you can configure the number of spaces that child elements should be indented. Its not very good though when it comes to complicated XPaths. If I have a long XPath in my code, I like to make it's structure as transparent as possible by making it look something like this...
<xsl:for-each select="/some
/very[@test = 'whatever']
/long[@another-test = perhaps
/another
/long
/xpath[@goes='here']]
/xpath"
However, I currently have to do that manually as nxml will just align it all up with the "/some.."