Subject: RE: [xsl] pulling info from SVG file with document(file) function From: "Wilcox, Paul" <Paul.Wilcox@xxxxxxxxxxxxx> Date: Thu, 16 Aug 2001 09:42:38 -0400 |
Ok Im all set! matching on the svg:svg namespace worked! I also set the return from the document in a variable as suggested. Thanks all. -----Original Message----- From: Jiri Jirat [mailto:Jiri.Jirat@xxxxxxxxx] Sent: Thursday, August 16, 2001 2:18 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] pulling info from SVG file with document(file) function Hi, don't forget, that SVG namespace IS DEFINED in the DTD! It is hidden and if you are matching just "svg" element from null namespace, you will match nothing. Try to match "svg:svg" element, where the prefix is defined as follows: xmlns:svg = http://www.w3.org/2000/svg-20000303-stylable (I hope, looking at your DTD name. The newer namespace is http://www.w3.org/2000/svg. See our namespace reference http://www.zvon.org/index.php?nav_id=172 for details and look for SVG) I have crashed on that many times too :-) Regards Jirka "Wilcox, Paul" wrote: > > I am at an impass trying to use the document() function to pull specific > information from a secondary file. > I can use <xsl:copy-of select="document(file)" /> to copy the svg into the > output, but can not pull > specific information, i.e. the attributes from the top level <svg> tag. > I am using saxon 6.2.2. > > ideas? > > Thanks. > > xsl: > > <xsl:value-of select="document($file)//svg/@width" /> > <xsl:value-of select="document($file)//svg/@height" /> > <xsl:value-of select="document($file)//svg/@viewBox" /> > > (I have also tried document($file)/svg/@width, and > document($file//svg/@width) ) > > source svg file: > > <?xml version="1.0" encoding="iso-8859-1"?> > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" > "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd" > [ > <!ENTITY st0 "fill-rule:nonzero;clip-rule:nonzero;"> > <!ENTITY st1 > "fill-rule:nonzero;clip-rule:nonzero;fill:none;stroke:#000000;stroke-width:0 > .481;stroke-linecap:square;stroke-miterlimit:10;"> > <!ENTITY st2 "font-family:'Arial-BoldMT';"> > ]> > <svg width="685.42pt" height="469.3pt" viewBox="0 0 685.42 469.3" > xml:space="preserve"> > <style type="text/css" /> > ....more.... > </svg> > > Paul Wilcox > Software Engineer > Global Knowledge and Language Services > XEROX > email: Paul.Wilcox@xxxxxxxxxxxxx > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list -- <name firstName="Jirka" surname="Jirat"/> <mail> jiratj@xxxxxxxxx </mail> <support> http://www.zvon.org </support> <zvonMailingList> http://www.zvon.org/index.php?nav_id=4 </zvonMailingList> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] pulling info from SVG fil, Robert Koberg | Thread | [xsl] string length, Eric Schenfeld |
RE: [xsl] Re: Microsoft XML, Julian Reschke | Date | RE: [xsl] apostrophe in paramter ca, Uronis, Jeremy |
Month |