Changeset 197

Show
Ignore:
Timestamp:
01/24/07 13:20:10
Author:
dan
Message:

exclude id 65535 (~=-1) from idmapping; fix doubling of <data> nodes with simple xslt
(apply-templates matches * and text(), but not @*!).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/swft/swft.h

    r155 r197  
    3939         
    4040        int doMap( const char *oldID ) { 
     41        int id = atoi( oldID ); 
     42        if( id == 65535 ) return id; 
     43             
    4144                std::map<std::string,int>& m = *(maps.top()); 
    4245                int r = m[oldID]; 
  • trunk/src/xslt/simple-import.xslt

    r195 r197  
    387387        <xsl:attribute name="{name()}"><xsl:value-of select="swft:map-id(.)"/></xsl:attribute> 
    388388</xsl:template> 
    389 <xsl:template match="@*|text()" mode="idmap" priority="-1"> 
     389<xsl:template match="text()" mode="idmap" priority="-1"> 
     390        <xsl:copy select="."/> 
     391</xsl:template> 
     392<xsl:template match="@*" mode="idmap" priority="-1"> 
    390393        <xsl:copy select="."/> 
    391394</xsl:template> 
     
    393396        <xsl:copy select="."> 
    394397                <xsl:apply-templates select="@*" mode="idmap"/> 
    395                 <xsl:apply-templates select="text()" mode="idmap"/> 
    396398                <xsl:apply-templates mode="idmap"/> 
    397399        </xsl:copy>