Page 1 of 1

Schematron XPath format and indent inconsistencies (apparent

Posted: Wed Jun 03, 2015 12:25 am
by whyme
I am working with a suite of Schematron files that have dependencies (by way of sch:include). When I format and indent the master Schematron files (the including files, not the included), complex XPath expressions in sch:let/@value and sch:assert/@test (but not, strangely, in sch:report/@test) return a well indented XPath expression, but all the color coding has been lost. E.g., this long but nicely colored XPath expression (color not illustrated)...

Code: Select all

<assert test="for $i in (1 to 10), $j in (2 to 50) return if (true()) then $i else $j">This
is a test</assert>
...becomes this, in monochrome:

Code: Select all

<assert
test="
for $i in (1 to 10),
$j in (2 to 50)
return
if (true()) then
$i
else
$j"
>This is a test</assert>
But this is true only in the master schematron files (and not in sch:report/@test). In dependent schematron files, none of this indenting happens, and the color coding is retained.

I've tried various settings in Options / Preferences but nothing seems to change this behavior. My preference would be to have the best of both systems: to have automatic indenting (and clearly marked options in the Preferences to change this behavior) and the XPath expression color-coded. Any thoughts? I'm running version 17.0 build 2015043018 on Mac OS 10.9.5.

Re: Schematron XPath format and indent inconsistencies (appa

Posted: Wed Jun 03, 2015 11:17 am
by florin
Hello,

It seems that you actually encountered two issues.

The first one is that values of sch:report/@test should be identified as XPath expressions and should be indented like in the case of sch:let/@value and sch:assert/@test.

The second one is that the syntax highlight feature stops working if the values of the attributes, containing the XPath expressions, begin with a new line character.

I've logged these issues and we'll fix them soon.

Regarding the options, there is one single option that controls if oXygen does indent or not the XPath expressions in Schematron files - please see Options > Preferences > Editor / Format / XPath options page. Here, you can disable the "Format XPath code embedded in XSLT, XSD and Schematron files" option. This way, you can get a consistent behavior regarding the XPath expressions indentation.

Best regards,
Florin

Re: Schematron XPath format and indent inconsistencies (appa

Posted: Wed Jun 03, 2015 4:01 pm
by whyme
Thanks, Florin. To that could you add a third bug, that included Schematron files (which always have a rootmost element that is not sch:schema) do not exhibit the same behavior during format/indent as master Schematron files do? Thanks so much.

Re: Schematron XPath format and indent inconsistencies (appa

Posted: Thu Jun 04, 2015 10:08 am
by florin
Hi,

Thank you for pointing this out. We'll deal with it along with the other issues.

Best regards,
Florin

Re: Schematron XPath format and indent inconsistencies (apparent

Posted: Thu Aug 06, 2015 12:27 pm
by Radu
Hi,

The reported problem should be fixed in the latest Oxygen 17.0 kits available on our web site.

Regards,
Radu