Open yegor256 opened 7 hours ago
@maxonfjvipon WDYT?
@yegor256 the function checks the presence of @abstract
attribute.
<xsl:function name="eo:abstract" as="xs:boolean">
<xsl:param name="o" as="element()"/>
<xsl:sequence select="not(exists($o/@base)) and (exists($o/o) or $o/@atom or $o/@abstract)"/>
</xsl:function>
I'm not sure we can remove the attribute because there's no unique combination of other mandatory attributes like @base
or @name
which may replace @abstract
@yegor256 or no. Actually if object does not have @base
- it's already abstract. It seems that it's enough. WDYT?
@maxonfjvipon yes, seems to be correct: no @base
means "being abstract" or "being an atom". Maybe we can just simplify this to:
<xsl:sequence select="not(exists($o/@base)) and (exists($o/o) or $o/@atom)"/>
@yegor256 even exists($o/o)
is not necessary because the object can be empty
@maxonfjvipon let's get rid of it!
We have a function
eo:abstract
and the@abstract
attribute. It seems that the attribute is redundant: we can get rid of it and only live with the function.