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 8574 - F.1 Stylesheet for chameleons incomplete
Summary: F.1 Stylesheet for chameleons incomplete
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2009-12-31 16:21 UTC by Hans-Juergen Rennau
Modified: 2010-08-18 20:06 UTC (History)
1 user (show)

See Also:


Attachments

Description Hans-Juergen Rennau 2009-12-31 16:21:20 UTC
The stylesheet is incomplete: it forgets the attribute 'memberTypes' for which doubtless it should also transform QNames without namespace into QNames with the new target namespace. The following template rule would do the job.

With kind regards -
Hans-Juergen Rennau


  <xsl:template match="@memberTypes">
    <xsl:variable name="context" select=".."/>
    <xsl:variable name="values" as="xs:string+">
       <xsl:for-each select="tokenize(., '\s+')">
          <xsl:variable name="oldValue" 
                        select="resolve-QName(., $context)" 
                        as="xs:QName"/>
          <xsl:sequence 
             select="if (namespace-uri-from-QName($oldValue) eq '') 
                then concat($prefixForTargetNamespace, ':', 
                            local-name-from-QName($oldValue))
                else string(.)"/>
       </xsl:for-each>
    </xsl:variable>
    <xsl:attribute name="{name()}" select="string-join($values, ' ')"/> 
  </xsl:template>
Comment 1 David Ezell 2010-01-14 19:05:43 UTC
On the telcon on 2010-01-08 the WG decided to accept the suggested changes to the stylesheets, with a request to Sandy Gao to insert these changes into the status quo.
Comment 2 C. M. Sperberg-McQueen 2010-08-16 17:12:43 UTC
The revised form of the stylesheet has been attached to bug 8573; it is included in the new status-quo document at 

  http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.html#chameleon-xslt
  (member-only link)

I believe this resolves the issue, so I'm marking the issue RESOLVED.

As the originator, Hans-Jürgen Rennau is invited to check that the corrections have been made correctly (it's always easy to mess something up) and indicate by either closing or reopening the issue that  he is satisfied, or not satisfied, with the resolution of the issue.  If the WG does not hear from you in the next two weeks or so, we will assume that you are satisfied.  

Thank you very much for catching the errors, and for providing the fixes.
Comment 3 Hans-Juergen Rennau 2010-08-18 20:06:34 UTC
Thank you, looks fine, I close the issue.