[Bug 8574] New: F.1 Stylesheet for chameleons incomplete

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

           Summary: F.1 Stylesheet for chameleons incomplete
           Product: XML Schema
           Version: 1.1 only
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: David_E3@VERIFONE.com
        ReportedBy: hrennau@yahoo.de
         QAContact: www-xml-schema-comments@w3.org
                CC: cmsmcq@blackmesatech.com


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>


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 31 December 2009 16:21:22 UTC