K
kdjansen
I've been using XML to define 3d map geometry for a game engine, like
this:
<wall x1="-1000" y1="300" x2="1000" y2="300" z="0" height="100"
texture="nature/wood001" />
However, I would like specify the texture not by a filename, but by a
CSS style, like this:
<wall x1="-1000" y1="300" x2="1000" y2="300" z="0" height="100"
style="texture-group: nature; texture-resolution: xx-high; texture-
family: wood; target: wall;" />
because textures could then be defined with external stylesheets and
allow reuse with class attributes.
However, there are no CSS specifiers for things like textures or image
resolution.
I have looked into other things like XSLT, but those are not what I'm
looking for (although I did use XSLT to make SVG overview maps)
Is there any way to create custom CSS attributes and apply it to an
XML document? Or at least a library that will store non-standard
attributes?
this:
<wall x1="-1000" y1="300" x2="1000" y2="300" z="0" height="100"
texture="nature/wood001" />
However, I would like specify the texture not by a filename, but by a
CSS style, like this:
<wall x1="-1000" y1="300" x2="1000" y2="300" z="0" height="100"
style="texture-group: nature; texture-resolution: xx-high; texture-
family: wood; target: wall;" />
because textures could then be defined with external stylesheets and
allow reuse with class attributes.
However, there are no CSS specifiers for things like textures or image
resolution.
I have looked into other things like XSLT, but those are not what I'm
looking for (although I did use XSLT to make SVG overview maps)
Is there any way to create custom CSS attributes and apply it to an
XML document? Or at least a library that will store non-standard
attributes?