Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL Yielding HTML With SVG

Status
Not open for further replies.

hungerf5

IS-IT--Management
Sep 17, 2001
36
0
0
US
I have an xml file that has both textual and graphical information. I need to output the textual information as html and embed the graphical information into the html as svg.

Is it be possible to write an xsl file that would output an html file with embedded svg?


--Rick
 
Can you give an example of what you want?

by SVG, you mean "Scalable Vector Graphics" right?

Basically... if you can put it in a web page, XSL can do it ;-)

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Sure thing....

Below is a really simple example of the XML data:

Code:
<parts>
	<part id="square-1">
		<name>First Square</name>
		<type>Square</type>
		<points>
			<point id="1">
				<x>0</x>
				<y>0<5/y>
			</point>
			<point id="2">
				<x>0</x>
				<y>5</y>
			</point>
			<point id="3">
				<x>5</x>
				<y>5</y>
			</point>
			<point id="4">
				<x>5</x>
				<y>0</y>
			</point>
		</points>
    </part>
		<part id="rectangle-1">
		<name>First Rectangle</name>
		<type>Rectangle</type>
		<points>
			<point id="1">
				<x>0</x>
				<y>0<5/y>
			</point>
			<point id="2">
				<x>0</x>
				<y>5</y>
			</point>
			<point id="3">
				<x>10</x>
				<y>5</y>
			</point>
			<point id="4">
				<x>10</x>
				<y>0</y>
			</point>
		</points>
    </part>
</parts>

Keeping it things simple, just list the parts in a the table below and put a SVG file in the last column:

Code:
  <tr>
    <th>Row #</th>
    <th>Part ID</td>
    <th>Name</td>
    <th>Type</td>
    <th>SVG Thumbnail</td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>

--Rick
 
This may or may not be a concern but I must be able to print the svg data. I'm pretty sure that inline embedded svg will not print.

--Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top