HooshierTeenGuy
New Member
I am trying to put together some xml files and output them in xhtml using an xslt transformation. I go about it by specifiying an xml file called index.xml where I define the other files which I need to use like this:\[code\]<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="http://stackoverflow.com/questions/14440891/merge.xsl"?><dic:dictionary xmlns:dic = "dictionary"><dic:Logo>Logo</dic:Logo><dic:Author>User Name</dic:Author><dic:EnglishWords>english</dic:EnglishWords><dic:SwedishTranslation>swedish</dic:SwedishTranslation><dic:SwedishWords>swedish</dic:SwedishWords><br/><dic:EnglishTranslation>english</dic:EnglishTranslation></dic:dictionary>\[/code\]Then in my transformation I have a template declaration for the logo like this:\[code\]<!--Logo--> <xsl:template match = "dic:index//Logo"> <html> <head> <link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/14440891/Style.css" /> </head> <body> <div id = "Logo"> <xsl:apply-templates select="document(concat(.,'.svg'))"/> </div> </body> <xsl:apply-templates/></html></xsl:template>\[/code\]The svg file itself looks like this:\[code\]<?xml version="1.0" standalone="no"?><?xml-stylesheet href="http://stackoverflow.com/questions/14440891/Style.css" type="text/css"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="180px" height="70px" viewBox="0 0 180 70" enable-background="new 0 0 180 70" xml:space="preserve" preserveAspectRatio="xMinYMin meet"><line fill="none" stroke="#000000" x1="0" y1="71.533" x2="35.036" y2="5.109"/><line fill="none" stroke="#000000" x1="91.971" y1="15.767" x2="91.971" y2="71.533"/><line fill="none" stroke="#000000" x1="146.357" y1="5.109" x2="177.372" y2="71.533"/><line fill="none" stroke="#000000" x1="0" y1="71.533" x2="177.372" y2="71.533"/><line fill="none" stroke="#000000" x1="17.518" y1="58.108" x2="82.481" y2="58.108"/><line fill="none" stroke="#000000" x1="101.459" y1="58.108" x2="161.866" y2="58.108"/><line fill="none" stroke="#000000" x1="82.481" y1="58.108" x2="91.971" y2="71.533"/><line fill="none" stroke="#000000" x1="101.459" y1="58.108" x2="91.971" y2="71.533"/></svg>\[/code\]However, while this approach works for other xml files it does not for this svg file, as an output I only get the word Logo. I have been looking around everywhere but I don+t see a good example on how to do this. Also when I try to apply a css style sheet in which I have the following\[code\]#Logo{width: 300px ;margin-left: auto ;margin-right: auto ;}\[/code\]It does not work either...How to make the css work ...?Any help or info about this will be appreciated.Thank you very much.