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

Re: [XSL-FO] Illustrator SVG to FO

Expand Messages
  • G. Ken Holman
    ... An XML instance with a DOCTYPE cannot be included or referenced from inside of another instance. ... Right ... because of the DOCTYPE. ... Thankfully the
    Message 1 of 5 , Apr 7, 2004
      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
    • Victor Vishnyakov
      The following part of your SVG is allowed only in the beginning of the ... Just delete this part if you are embedding using or
      Message 2 of 5 , Apr 7, 2004
        The following part of your SVG is allowed only in the beginning of the
        XML file:

        > <?xml version="1.0" encoding="utf-8"?>
        > <!-- Generator: Adobe Illustrator 10.0, SVG Export Plug-In . SVG
        > Version: 3.0.0 Build 76) -->
        > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG
        > 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-
        > 20010904/DTD/svg10.dtd" [
        > <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
        > <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
        > <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
        > <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
        > <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
        > <!ENTITY
        > ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
        > <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
        > <!ENTITY
        > ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
        > <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
        > <!ENTITY ns_svg "http://www.w3.org/2000/svg">
        > <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
        > ]>

        Just delete this part if you are embedding using
        <fo:instream-foreign-object...> or use <fo:external-graphics...>


        Regards,
        Victor Vishnyakov

        > -----Original Message-----
        > From: Chris [mailto:nichchr@...]
        > Sent: Wednesday, April 07, 2004 8:51 PM
        > To: XSL-FO@yahoogroups.com
        > Subject: [XSL-FO] Illustrator SVG to FO
        >
        >
        > I generated an svg from Illustrator and am trying to place it in a
        > XSL:FO and am having some trouble. 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. Anyone know how
        > to do this? Thanks, chris
        >
        >
        > Illustrator SVG code:
      • 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 3 of 5 , Apr 8, 2004
          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 4 of 5 , Oct 17, 2005
            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.