Skip to content

Commit

Permalink
Support a new pointer-type attribute abbreviation on containers.
Browse files Browse the repository at this point in the history
<container pointer-type='foo'> -> <container><pointer type-name='foo'/>
  • Loading branch information
angavrilov committed Jul 21, 2012
1 parent 28bafd2 commit ea74f68
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 1 addition & 3 deletions df.world.xml
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,7 @@
-- Entities

<compound name='entities'>
<stl-vector name='all'>
<pointer type-name='historical_entity'/>
</stl-vector>
<stl-vector name='all' pointer-type='historical_entity'/>

<stl-vector name='bad' has-bad-pointers='true'>
<pointer type-name='historical_entity'/>
Expand Down
13 changes: 13 additions & 0 deletions lower-1.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,19 @@
<xsl:param name='level' select='-1'/>
<xsl:attribute name='ld:is-container'>true</xsl:attribute>
<xsl:choose>
<xsl:when test='@pointer-type'>
<ld:field ld:meta='pointer' ld:is-container='true'>
<xsl:attribute name='ld:level'><xsl:value-of select='$level'/></xsl:attribute>
<xsl:attribute name='type-name'><xsl:value-of select='@pointer-type'/></xsl:attribute>
<ld:field>
<xsl:call-template name='lookup-type-ref'>
<xsl:with-param name='name' select="@pointer-type"/>
<xsl:with-param name="level" select="$level+1"/>
</xsl:call-template>
</ld:field>
</ld:field>
<xsl:apply-templates select='node()'/>
</xsl:when>
<xsl:when test='@type-name'>
<ld:field>
<xsl:call-template name='lookup-type-ref'>
Expand Down

0 comments on commit ea74f68

Please sign in to comment.