|
Subject: Re: [xsl] X3D XSLT From: "Dean Fiala" <dfiala@xxxxxxxxx> Date: Sun, 1 Jun 2008 10:04:18 -0400 |
Attributes can only be added to to open element tag, you've closed off
ImageTexture
<ImageTexture containerField='texture'/>
<xsl:attribute name="url"><xsl:value-of select="Artist_Image"/>
You probably want...
<ImageTexture containerField='texture'>
<xsl:attribute name="url"><xsl:value-of select="Artist_Image"/>
</ImageTexture>
On Sun, Jun 1, 2008 at 9:30 AM, j milo taylor <milo@xxxxxxxxxx> wrote:
> Hi David,
>
> Thanks for your comments. I have made the changes you suggested. I think
> I've done it right, however the stylesheet can still not be compiled:
>
> Here's what I've got: error reported at line 35: Attribute 'url' outside of
> element.
>
> Here's the code:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <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"/>
> <xsl:template match="/">
> <X3D profile="Immersive">
> <head> <title/>
> </head>
> <Scene>
> <xsl:apply-templates/>
>
> </Scene>
> </X3D>
>
> </xsl:template>
>
> <xsl:template match="artists">
> <Group>
> <xsl:for-each select="artist">
> <Transform translation='.8 4 1'>
>
> <xsl:attribute name="translation"><xsl:value-of
> select="(position() - 1) * 6"/>
> </xsl:attribute>
> </Transform>
> <xsl:template match="Artist_Image">
> <Shape containerField='children'>
> <xsl:for-each select="Artist_Image">
>
> <Appearance containerField='appearance'>
> <ImageTexture containerField='texture'/>
> <xsl:attribute
> name="url"><xsl:value-of select="Artist_Image"/>
> </xsl:attribute>
> <Material containerField='material'
> ambientIntensity='0.200' shininess='0.200' diffuseColor='1 .50196 0'/>
> </Appearance>
> <Box containerField='geometry' size='5 5 0.2'/>
> </xsl:for-each>
>
> </Shape></xsl:template>
>
> </xsl:for-each>
> </Group>
> </xsl:template>
> </xsl:stylesheet>
>
> Thanks for your help:
> Best Regards
> J Milo Taylor
>
>
--
Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blogbaby
Microsoft MVP
RockNUG Figurehead
http://www.rocknug.org
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] X3D XSLT, j milo taylor | Thread | Re: [xsl] X3D XSLT, Florent Georges |
| [xsl] X3D XSLT, j milo taylor | Date | Re: [xsl] X3D XSLT, Florent Georges |
| Month |