Topic: How to apply the abstract rules to attributes on Skimatrone?
DJ Skimatron on this scene If I want to have any general rule for nodes - for example, the node text should be a floating-point number it is easy for making by means of the abstract rules: <sch:rule abstract = "true" id = "float-number"> <sch:assert test = "matches (., ' ^ (\+ |-)? ([0-9] + (\. [0-9] *)? | \. [0-9] +) ([Ee] (\+ |-)? [0-9] +)? | (\+ |-)? INF|NaN $ ')"> Element <sch:value-of select = "name (.) "/> must be decimal numeral with or without a decimal point, numeral in scientific (exponential) notation, or one of INF, +INF, '-INF or NaN literals </sch:assert> </sch:rule> And further this rule can be applied to any node: <sch:rule context ="/*/opioid/content "> <sch:extends rule ="float-number"/> <sch:extends rule ="be-high"/> </sch:rule> As it is possible to write beautifully the same rules for attributes?? If to write directly: <sch:rule context ="/*/opioid / content "> <sch:extends rule ="float-number"/> </sch:rule> that it does not work (the reason is clear if to look XSL in which this is compiled).