Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] Illustrator SVG to FO

Expand Messages
  • Bob Stayton
    Maybe I missed something, but I m wondering why it is necessary to put the SVG code directly in the FO instance? Since the SVG is in a separate file, couldn t
    Message 1 of 5 , Apr 8, 2004
    • 0 Attachment
      Maybe I missed something, but I'm wondering why it is necessary to put the
      SVG code directly in the FO instance? Since the SVG is in a separate file,
      couldn't you just use fo:external-graphic to reference the illustrator
      output? Then you don't need to remove the DOCTYPE, do you?

      Bob Stayton
      Sagehill Enterprises
      DocBook Consulting
      bobs@...


      ----- Original Message -----
      From: "G. Ken Holman" <gkholman@...>
      To: <XSL-FO@yahoogroups.com>
      Sent: Wednesday, April 07, 2004 3:13 PM
      Subject: Re: [XSL-FO] Illustrator SVG to FO


      > At 2004-04-07 17:50 +0000, Chris wrote:
      > >I generated an svg from Illustrator and am trying to place it in a
      > >XSL:FO and am having some trouble.
      >
      > An XML instance with a DOCTYPE cannot be included or referenced from
      inside
      > of another instance.
      >
      > >I was hoping I could place part
      > >of the source code generated by Illustrator (below) in <fo:instream-
      > >foreign-object>...</>. But that doesn't seem to work.
      >
      > Right ... because of the DOCTYPE.
      >
      > >Anyone know how to do this?
      >
      > Thankfully the situation is simply solved by processing your SVG file with
      > the simplest XSLT stylesheet there is:
      >
      > <?xml version="1.0" encoding="iso-8859-1"?>
      > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      > version="1.0">
      >
      > <xsl:template match="/">
      > <xsl:copy-of select="."/>
      > </xsl:template>
      >
      > </xsl:stylesheet>
      >
      > This will create a well-formed copy of the source and it won't have any
      > DOCTYPE to worry about.
      >
      > You can then include it in your XSL-FO instance directly or by using a
      > general entity reference.
      >
      > I hope this helps.
      >
      > .................... Ken
      >
      >
      > --
      > Public courses: Spring 2004 world tour of hands-on XSL instruction
      > Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
      > Hong Kong May 17-21; Bremen Germany May 24-28; Helsinki June 14-18
      >
      > World-wide on-site corporate, govt. & user group XML/XSL training.
      > G. Ken Holman mailto:gkholman@...
      > Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
      > Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
      > Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
    • odekij61
      Hello, I am trying to read the width and height attributes of an SVG but I receive a doctype error using Saxon 6.5.4. java -jar C: Apps Saxon saxon.jar
      Message 2 of 5 , Oct 17, 2005
      • 0 Attachment
        Hello,

        I am trying to read the width and height attributes of an SVG but I
        receive a doctype error using Saxon 6.5.4.

        java -jar C:\Apps\Saxon\saxon.jar 3173.svg readsvg.xsl

        <?xml version="1.0" encoding="UTF-8"?>
        <xsl:stylesheet version="2.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:fo="http://www.w3.org/1999/XSL/Format">
        <xsl:template match="/">
        <xsl:copy-of select="."/>
        </xsl:template>
        </xsl:stylesheet>


        Using the simple template gives this error:
        Error on line 15 column 1 of file:/C:/VasontU/Extract/3173.svg:
        Error reported by XML parser: Cannot read from
        http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd (Connection
        refused: connect)
        Transformation failed: Run-time errors were reported



        How do I get around this so I can read the svg height and width?

        Also, is it possible to read a compressed svgz width and height?

        Thanks,
        Jeremy Odekirk


        --- In XSL-FO@yahoogroups.com, "G. Ken Holman" <gkholman@c...> wrote:
        >
        > At 2004-04-07 17:50 +0000, Chris wrote:
        > >I generated an svg from Illustrator and am trying to place it in a
        > >XSL:FO and am having some trouble.
        >
        > An XML instance with a DOCTYPE cannot be included or referenced from
        inside
        > of another instance.
        >
        > >I was hoping I could place part
        > >of the source code generated by Illustrator (below) in <fo:instream-
        > >foreign-object>...</>. But that doesn't seem to work.
        >
        > Right ... because of the DOCTYPE.
        >
        > >Anyone know how to do this?
        >
        > Thankfully the situation is simply solved by processing your SVG
        file with
        > the simplest XSLT stylesheet there is:
        >
        > <?xml version="1.0" encoding="iso-8859-1"?>
        > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        > version="1.0">
        >
        > <xsl:template match="/">
        > <xsl:copy-of select="."/>
        > </xsl:template>
        >
        > </xsl:stylesheet>
        >
        > This will create a well-formed copy of the source and it won't have any
        > DOCTYPE to worry about.
        >
        > You can then include it in your XSL-FO instance directly or by using a
        > general entity reference.
        >
        > I hope this helps.
        >
        > .................... Ken
        >
        >
        > --
        > Public courses: Spring 2004 world tour of hands-on XSL instruction
        > Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
        > Hong Kong May 17-21; Bremen Germany May 24-28; Helsinki June 14-18
        >
        > World-wide on-site corporate, govt. & user group XML/XSL training.
        > G. Ken Holman mailto:gkholman@C...
        > Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
        > Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
        > Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.