This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3520 - [XQueryX] multiple target locations
Summary: [XQueryX] multiple target locations
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQueryX 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-20 22:41 UTC by David Carlisle
Modified: 2006-08-01 09:37 UTC (History)
0 users

See Also:


Attachments

Description David Carlisle 2006-07-20 22:41:33 UTC
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
Comment 1 Jim Melton 2006-08-01 01:34:53 UTC
Thank you for your comment.  You are obviously correct and I agree with your proposed solution, which I have implemented. 

Consequently, I am marking this bug FIXED.  If, after testing, you agree that the bug is, indeed, fixed, please mark it CLOSED. 

(I will post the revised stylesheet shortly.)