Skip to content

Commit

Permalink
Fixed $type-constraints and $type-shapes types
Browse files Browse the repository at this point in the history
  • Loading branch information
namedgraph committed Nov 9, 2023
1 parent 79c2ad3 commit 3c12d36
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,10 @@ exclude-result-prefixes="#all"
<xsl:param name="constructor" as="document-node()?"/>
<xsl:param name="template" as="element()*"/>
<xsl:param name="cloneable" select="false()" as="xs:boolean"/>
<xsl:param name="type-constraints" as="document-node()*"/>
<xsl:param name="type-shapes" as="document-node()*"/>
<xsl:param name="type-constraints" as="element()*"/>
<xsl:param name="type-shapes" as="element()*"/>
<!-- only the first property that has a mandatory constraint is required, the following ones are not -->
<xsl:param name="required" select="($type-shapes//rdf:Description[sh:path/@rdf:resource = $this][sh:minCount &gt;= count(preceding-sibling::*[concat(namespace-uri(), local-name()) = $this])]) or ($type-constraints//srx:binding[@name = 'property'][srx:uri = $this] and not(preceding-sibling::*[concat(namespace-uri(), local-name()) = $this]))" as="xs:boolean"/>
<xsl:param name="required" select="($type-shapes[sh:path/@rdf:resource = $this][sh:minCount &gt;= count(preceding-sibling::*[concat(namespace-uri(), local-name()) = $this])]) or ($type-constraints//srx:binding[@name = 'property'][srx:uri = $this] and not(preceding-sibling::*[concat(namespace-uri(), local-name()) = $this]))" as="xs:boolean"/>
<xsl:param name="id" select="generate-id()" as="xs:string"/>
<xsl:param name="for" select="generate-id((node() | @rdf:resource | @rdf:nodeID)[1])" as="xs:string"/>
<xsl:param name="class" select="concat('control-group', if ($error) then ' error' else (), if ($required) then ' required' else ())" as="xs:string?"/>
Expand Down

0 comments on commit 3c12d36

Please sign in to comment.