Page 1 of 1

Long select attributes of xsl:variable and xsl:value-of

Posted: Wed Aug 26, 2009 6:54 pm
by alyxandr
This might be more of a general XML/XSL question than one specific to oXygen, for which i apologize, but is there an aesthetically acceptable way to format long bits of xpath (which can happen a lot in XSLT 2.0) in select attributes, in a way that will be preserved? The XML spec apparently states that CRs in attributes can be stripped, but spaces aren't, which makes for long single lines with large areas of whitespace intermingled, which "Format and Indent" won't touch.

Any ideas appreciated,

--alex.

Re: Long select attributes of xsl:variable and xsl:value-of

Posted: Thu Aug 27, 2009 11:10 am
by sorin_ristache
Hello,

You can enable the option Break long attributes that is available in Preferences -> Editor -> Format -> XML if you want to break a long XPath expression when applying the action Format and Indent. That option inserts newline characters in attribute values if the maximum line width set in the option Line width - Format and Indent (available in Preferences -> Editor -> Format) is exceeded.


Regards,
Sorin

Re: Long select attributes of xsl:variable and xsl:value-of

Posted: Thu Aug 27, 2009 9:01 pm
by alyxandr
Awesome, thanks!