[Bug 3520] [XQueryX] multiple target locations

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3520

           Summary: [XQueryX] multiple target locations
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQueryX
        AssignedTo: jim.melton@acm.org
        ReportedBy: davidc@nag.co.uk
         QAContact: public-qt-comments@w3.org


The stylesheet templates for xqx:moduleImport and xqx:schemaImport
both have the construct


    <xsl:if test="xqx:targetLocation">
      <xsl:text> at </xsl:text>
      <xsl:call-template name="quote">
        <xsl:with-param name="item" select="xqx:targetLocation"/>
      </xsl:call-template>
    </xsl:if>


which has the effect that if there are multiple xqx:targetLocation (as allowed
by the schema, and the XQuery EBNF) then all but the first are quietly dropped.

I suggest replacing this in both cases by

<xsl:apply-templates select="xqx:targetLocation"/>

and adding


<xsl:template match="xqx:targetLocation">
  <xsl:choose>
   <xsl:when test="position()=1"> at </xsl:when>
   <xsl:otherwise>, </xsl:otherwise>
  </xsl:choose>
    <xsl:call-template name="quote">
      <xsl:with-param name="item" select="."/>
    </xsl:call-template>
</xsl:template>

David

Received on Thursday, 20 July 2006 22:41:35 UTC