RE: XSLT and SVG

Subject: RE: XSLT and SVG
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Sun, 17 Sep 2000 18:52:23 +0100
>Thanks and apologies. First, thanks for your detailed reply. Second, my
>apologies. I did succeed in getting SVG to SVG transformations working
>yesterday, at least for simple transformations and didn't report
>that back to
>the list or to you.
>
>I believe my original problem related to the (now) known problems
>with using
><xsl:for-each) which was what I happened to use in the original
>code. I was
>getting zero output in the output document (which, I believe, is distinct
>from the failure to display problem which I return to later),
>except for the
>XML declaration mentioned below. When I started again from  a bare SVG
>template and progressively added elements and attributes then they copied
>across to the output document as I would expect them to.
>
>I happen to be using the July 2000 preview of MSXML. It adds "<?xml
>version="1.0" encoding="utf-8"?>" routinely to all output for SVG to SVG.

Perhaps you could look at my examples because there is no way I can get it
to give me UTF-8
>
>Regarding the problems with failure to display output SVG I think this may
>partly relate to your using a .xml file extension for your source
>document.

No I am using svg extension
>I
>am assuming that your problem occurs when you do a "Preview in Browser" or
>similar in some integrated environment. If, as I guess, you are
>using IE5 or
>5.5 then it fails to "realise" that the output is SVG, given that
>the input
>was a .xml file and the Adobe SVG Viewer is not called on. If you
>rename your
>source document with a .svg extension then IE5.5, at least, will recognise
>that it needs the Adobe SVG viewer and will, I expect, display the
>output SVG
>appropriately.
>
>Also, it may help you to swap over the values of the doctype-system and
>doctype-public attributes of <xsl:output>. At least with July 2000 that
>produced the correct DOCTYPE declaration in the output file. With
>July 2000
>MSXML the presence of the encoding attribute didn't seem to cause
>any problem.

I don't think the doctype is wrong. It is the same as the doctype in the
test suite.
>
>Yes, there does appear to be an issue with whitespace, but I haven't had
>enough time yet to decide exactly what is happening there.
>
>For testing more "real world" transformations of style attributes I had
>planned to use <xsl:attribute-set> but haven't had the opportunity to try
>that out yet.

I don't think they are useful in this case because they usually add default
attributes if they don't exist. If you are going from xml to svg then they
could be used to add a style attribute. I am trying to address the problem
of changing just one or two css properties in a style attribute that already
exists. i.e. making all text red. This isn't just useful for svg it can come
in handy when scraping xhtml.

Ciao Chris


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread