Open AndrewSales opened 4 years ago
- The existing schema has line breaks in messages. The schema should be consistent one way or the other. (I'm old-school and favour lines less that 80 characters, plus having to scroll horizontally when looking at code on GitHub is a pain.)
Noted. I favour shorter lines too for readability - it's always possible to pull the code and review it in your preferred environment with indentation of your choosing instead, but perhaps that too introduces a further level of pain.
However, linebreaks in this context are significant. I admittedly didn't remove them elsewhere for consistency, but if we are going into this level of - arguably cosmetic - detail in a pull request that aims to address an issue a user encountered which would otherwise have been caught by the code proposed here, then I'd be inclined to remove them (as well as leading and trailing space) in all assert
s in this schema.
- The existing
sch:assert
matches an potentially erroneous superset of what the addedsch:assert
matches. Should the existingsch:assert
just be removed?
Yes, OK.
- Changing
../../
toancestor::sch:pattern/
would make the relationship even more explicit (and save some of us from having to look at the schema to confirm the XPath).
Another way to have made it clearer would just have been to make the path in sch:rule/@context
explicit: sch:pattern/sch:rule/sch:extends[@rule]
, which makes the hierarchy completely clear.
sch:assert
matches an potentially erroneous superset of what the addedsch:assert
matches. Should the existingsch:assert
just be removed?../../
toancestor::sch:pattern/
would make the relationship even more explicit (and save some of us from having to look at the schema to confirm the XPath).