Guest EBurrows Posted October 18, 2010 Share Posted October 18, 2010 I am performing various XML to XML transformations and I'm currently using editors like VIM and Visual Studio Express. When I'm editing the XSLT file, Visual Studio offers Intellisense suggestions based on the XSL 2.0 schema, which is great. But when I'm editing the output XML in the templates, it goes quiet. Obviously, I understand how it works, that the output XML is in little fragments and so on -- but I wondered if there are any XSLT editors out there that can make suggestions on the fly for the output based on a DTD or schema combined with a declared namespace prefix.(The main reason this has come up is because I was recently outputting WordML whose markup is a pain to enter manually - I thought it would be nice if the software could make suggestions whenever I typed in <w: based on an attached WordML schema )So any suggestions would be welcome. Link to comment Share on other sites More sharing options...
boen_robot Posted October 24, 2010 Share Posted October 24, 2010 StylusStudio is the editor of my choice, but I haven't tested how it works with mixed namespaced documents.The reason most editors fail to offer any suggestions is because the XML Schema for XSLT is very loose, since it can't know the kind of XML you're going to be outputting, and editors usually load and validate against one schema at a time (determined by the root element of the XML document; the XSLT schema in XSLT documents).In theory, one could make an editor that suggests the root elements of the secondary dialect as a possible child of every XSLT element... but that would be of limited use. Imagine:<xsl:template><w: Suggestions look fine. document><xsl:for-each select="/custom/element"><w: Suggestions start with suggesting "w:document" again... not really useful when you're in a w:document already.Stylus Studio in particular tries to be intelligent about HTML, since that's often what XSLT is used for, but it can't really do the same for any dialect, because XML Schema is too limited in this regard, and validation languages like Schematron which aren't, can't deal with "tokens" that are to be suggested in the traditional sence. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.