Skip to content

Commit

Permalink
Make sure main doc's base URI is used in bs2:FormControl and not th…
Browse files Browse the repository at this point in the history
…e template's (which is empty)
  • Loading branch information
namedgraph committed Oct 6, 2023
1 parent 526284b commit 0737baa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ exclude-result-prefixes="#all"
<xsl:param name="class" select="'subject input-xxlarge'" as="xs:string?"/>
<xsl:param name="disabled" select="false()" as="xs:boolean"/>
<xsl:param name="auto" select="local-name() = 'nodeID' or starts-with(., $ldt:base)" as="xs:boolean"/>
<xsl:param name="base-uri" select="base-uri()" as="xs:anyURI"/>

<xsl:choose>
<xsl:when test="not($type = 'hidden')">
Expand Down Expand Up @@ -527,7 +528,7 @@ exclude-result-prefixes="#all"
-->
<!-- hidden inputs in which we store the old values of the visible input -->
<input type="hidden" class="old su">
<xsl:attribute name="value" select="if (local-name() = 'about') then . else resolve-uri(concat('/', ac:uuid()), base-uri())"/>
<xsl:attribute name="value" select="if (local-name() = 'about') then . else resolve-uri(concat('/', ac:uuid()), $base-uri)"/>
</input>
<input type="hidden" class="old sb">
<xsl:attribute name="value" select="if (local-name() = 'nodeID') then . else generate-id()"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1185,17 +1185,15 @@ extension-element-prefixes="ixsl"
<xsl:with-param name="shapes" select="$shapes"/>
<xsl:with-param name="traversed-ids" select="$traversed-ids" tunnel="yes"/>
<xsl:with-param name="property-metadata" select="$property-metadata" tunnel="yes"/>
<xsl:with-param name="base-uri" select="base-uri()"/> <!-- make sure main doc's base URI is used and not the template's (which is empty) -->
</xsl:apply-templates>

<!-- do not show property controls if there is no constructor or it has no properties -->
<!-- <xsl:if test="$template/*">-->
<xsl:apply-templates select="." mode="bs2:PropertyControl">
<xsl:with-param name="template" select="$template"/>
<xsl:with-param name="forClass" select="$forClass"/>
<xsl:with-param name="required" select="true()"/>
<xsl:with-param name="property-metadata" select="$property-metadata"/>
</xsl:apply-templates>
<!--</xsl:if>-->
<xsl:apply-templates select="." mode="bs2:PropertyControl">
<xsl:with-param name="template" select="$template"/>
<xsl:with-param name="forClass" select="$forClass"/>
<xsl:with-param name="required" select="true()"/>
<xsl:with-param name="property-metadata" select="$property-metadata"/>
</xsl:apply-templates>
</fieldset>
</xsl:template>

Expand Down

0 comments on commit 0737baa

Please sign in to comment.