|
Subject: [xsl] Re: xsl-list Digest 11 Jun 2008 05:10:01 -0000 Issue 1525 From: milo@xxxxxxxxxx Date: Wed, 11 Jun 2008 08:46:13 -0400 |
set the y position of <Group> 'for each select artist' to be value of <Artist_Year> - 1900
and if two or more <Artist_Year> values are equal, offset each subsequent node by 6 on the x axis?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output media-type="model/x3d=xml" doctype-system="http://www.web3d.org/specifications/x3d-3.2.dtd" method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
<head> <title/></head>
<Scene> </Scene>
</X3D> <xsl:attribute name="translation"><xsl:text> 0
</xsl:text><xsl:value-of select="(position() -1) * 6 + 2"/><xsl:text>
0 </xsl:text></xsl:attribute><!! --- This line here is where i need
the change --!!>
<Shape>
<Appearance>
<xsl:element name="ImageTexture">
<xsl:attribute name="url">
<xsl:value-of
select="Artist_Image"/>
</xsl:attribute>
</xsl:element>
<Material containerField='material' ambientIntensity='0.2' shininess='0.2' diffuseColor='1 .5 0'/> </Appearance>
<Box containerField='geometry' size='3 3 0.1'/>
</Shape>
</Transform> <Transform translation='0 1.1 0'>
<xsl:attribute name="translation"><xsl:text> 2
</xsl:text><xsl:value-of select="(position() -1) *6 + 1.1"/><xsl:text>
0 </xsl:text></xsl:attribute>
<Shape>
<Appearance><Material containerField='material' ambientIntensity='0.2' shininess='0.2' diffuseColor='255 255 255'/>
</Appearance>
<xsl:element name="Text">
<xsl:attribute name="string">
<xsl:value-of
select="Artist_Year"/>
</xsl:attribute><FontStyle containerField='fontStyle' family='Arial' style='PLAIN' justify='"BEGIN" "BEGIN"' size='0.6' spacing='1'/>
</xsl:element>
</Shape>
</Transform> <Transform translation='0 0.4 0'>
<xsl:attribute name="translation"><xsl:text> 2
</xsl:text><xsl:value-of select="(position() -1) * 6 +
0.4"/><xsl:text> 0 </xsl:text></xsl:attribute>
<Shape>
<Appearance><Material containerField='material' ambientIntensity='0.2' shininess='0.2' diffuseColor='255 255 255'/>
</Appearance> <xsl:element name="Text">
<xsl:attribute name="string">
<xsl:value-of
select="Artist_Country"/>
</xsl:attribute><FontStyle containerField='fontStyle' family='Arial' style='PLAIN' justify='"BEGIN" "BEGIN"' size='0.6' spacing='1'/>
</xsl:element>
</Shape>
</Transform>
</xsl:for-each>
</Group>
</xsl:template>| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Embedded bold,italic,anch, CyberSpace Industrie | Thread | [xsl] X3D stylesheet - value of, an, milo |
| Re: [xsl] Embedded bold,italic,anch, CyberSpace Industrie | Date | [xsl] X3D stylesheet - value of, an, milo |
| Month |