Here's an interesting situation. I'm working on an XML language for geometry, but I have a small problem in rendering a symbolism for arcs, rays and lines. For line segments, it's pretty simple: I associate a CSS styling with the element in question:
But beyond that, I need a little help...
For instance, with an arc:
the presentation would need to be in the format:
With a two-letter id attribute for geo:arc, I'd need:
A little different, obviously. So I'm wondering how to construct the <xsl:template>...</xsl:template> match attribute to distinguish between a two-character text content and a three-character text content.
Advice?
Code:
geo:line[ends="both"] { text-decoration: overline }
For instance, with an arc:
Code:
<geo:arc id="ABC">...</geo:arc>
Code:
<svg:g transform="translate(10,20)"> <svg:path d="M 0 10 A 20 10 0 0 1 26 10" fill="none" stroke="#000000" /> <svg:text x="0" y="20" font-family="Times New Roman">ABC</svg:text> </svg:g>
Code:
<svg:g transform="translate(10,0)"> <svg:path d="M 0 10 A 20 20 0 0 1 18 10" fill="none" stroke="#000000" /> <svg:text x="0" y="20" font-family="Times New Roman">AB</svg:text> </svg:g>
Advice?
Comment