]> granicus.if.org Git - docbook-dsssl/commitdiff
Make sure the choice doesn't get lost when doing the includes
authorNorman Walsh <ndw@nwalsh.com>
Sat, 23 Jul 2005 20:06:31 +0000 (20:06 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sat, 23 Jul 2005 20:06:31 +0000 (20:06 +0000)
docbook/relaxng/tools/include.xsl

index f4d1d73551e428b5766a4d277f7ad64784c829b0..4a916ab12d56fd81f56d659071358a815d9c17c0 100644 (file)
              <xsl:copy-of select="@*"/>
              <rng:choice>
                <xsl:apply-templates mode="combine"/>
-               <xsl:apply-templates select="$choices/*" mode="combine"/>
+               <xsl:for-each select="$choices">
+                 <xsl:choose>
+                   <xsl:when test="count(*) &gt; 1">
+                     <!-- implicit group -->
+                     <rng:group>
+                       <xsl:apply-templates select="*" mode="combine"/>
+                     </rng:group>
+                   </xsl:when>
+                   <xsl:otherwise>
+                     <xsl:apply-templates select="*" mode="combine"/>
+                   </xsl:otherwise>
+                 </xsl:choose>
+               </xsl:for-each>
              </rng:choice>
            </xsl:copy>
          </xsl:when>