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

external entities

Expand Messages
  • Kenneth Nellis
    I ve tried without success to get external entities to work. For example, let s say I want to define blue in a shared file as #00247D and then, in multiple,
    Message 1 of 6 , Nov 18, 2012
    • 0 Attachment
      I've tried without success to get external entities to work. For example, let's say I want to define "blue" in a shared file as #00247D and then, in multiple, separate SVG files, reference the shared definition (as "&blue;").

      I get that the SVG document that references the color would pull in the definition with something like the following in its DOCTYPE:

      <!ENTITY blue SYSTEM "colors.xml">

      And "blue" would be defined in file colors.xml, but I haven't been able to figure out how to define "blue" in file colors.xml. Suggestions would be most appreciated!

      Ideally, I wouldn't need separate <!ENTITY….> references in each SVG for each color, but could simply refer (somehow) to colors.xml and pull in all entity definitions in colors.xml.

      —Ken Nellis
    • Marty Sullivan
      I can t tell you if this is possible as I ve never tried to define external entities. However, to make the local entities in you svg, you would put them in the
      Message 2 of 6 , Nov 18, 2012
      • 0 Attachment
        I can't tell you if this is possible as I've never tried to define external
        entities. However, to make the local entities in you svg, you would put
        them in the DOCTYPE like so:

        <!DOCTYPE svg [
        <!ENTITY blue "0000FF">
        <!ENTITY green "#00FF00">
        <!ENTITY red "#FF0000">
        ]>

        and then refer to them as &red; &green; &blue; in your document.
        On Sun, Nov 18, 2012 at 5:26 PM, Kenneth Nellis <nellisks@...> wrote:

        > I've tried without success to get external entities to work. For example,
        > let's say I want to define "blue" in a shared file as #00247D and then, in
        > multiple, separate SVG files, reference the shared definition (as "&blue;").
        >
        > I get that the SVG document that references the color would pull in the
        > definition with something like the following in its DOCTYPE:
        >
        > <!ENTITY blue SYSTEM "colors.xml">
        >
        > And "blue" would be defined in file colors.xml, but I haven't been able to
        > figure out how to define "blue" in file colors.xml. Suggestions would be
        > most appreciated!
        >
        > Ideally, I wouldn't need separate <!ENTITY�.> references in each SVG for
        > each color, but could simply refer (somehow) to colors.xml and pull in all
        > entity definitions in colors.xml.
        >
        > �Ken Nellis
        >
        > ------------------------------------
        >
        > -----
        > To unsubscribe send a message to:
        > svg-developers-unsubscribe@yahoogroups.com
        > -or-
        > visit http://groups.yahoo.com/group/svg-developers and click "edit my
        > membership"
        > ----Yahoo! Groups Links
        >
        >
        >
        >


        [Non-text portions of this message have been removed]
      • Kenneth N
        Thanx for that, however I do have internal entities working just fine. Looking for help specifically with externally-defined ones. � Ken Nellis
        Message 3 of 6 , Nov 18, 2012
        • 0 Attachment
          Thanx for that, however I do have internal entities working just fine. Looking for help specifically with externally-defined ones.
          â€"Ken Nellis

          --- In svg-developers@yahoogroups.com, Marty Sullivan <dark3251@...> wrote:
          >
          > I can't tell you if this is possible as I've never tried to define external
          > entities. However, to make the local entities in you svg, you would put
          > them in the DOCTYPE like so:
          >
          > <!DOCTYPE svg [
          > <!ENTITY blue "0000FF">
          > <!ENTITY green "#00FF00">
          > <!ENTITY red "#FF0000">
          > ]>
          >
          > and then refer to them as &red; &green; &blue; in your document.
          > On Sun, Nov 18, 2012 at 5:26 PM, Kenneth Nellis <nellisks@...> wrote:
          >
          > > I've tried without success to get external entities to work. For example,
          > > let's say I want to define "blue" in a shared file as #00247D and then, in
          > > multiple, separate SVG files, reference the shared definition (as "&blue;").
          > >
          > > I get that the SVG document that references the color would pull in the
          > > definition with something like the following in its DOCTYPE:
          > >
          > > <!ENTITY blue SYSTEM "colors.xml">
          > >
          > > And "blue" would be defined in file colors.xml, but I haven't been able to
          > > figure out how to define "blue" in file colors.xml. Suggestions would be
          > > most appreciated!
          > >
          > > Ideally, I wouldn't need separate <!ENTITY�.> references in each SVG for
          > > each color, but could simply refer (somehow) to colors.xml and pull in all
          > > entity definitions in colors.xml.
          > >
          > > �Ken Nellis
          > >
          > > ------------------------------------
          > >
          > > -----
          > > To unsubscribe send a message to:
          > > svg-developers-unsubscribe@yahoogroups.com
          > > -or-
          > > visit http://groups.yahoo.com/group/svg-developers and click "edit my
          > > membership"
          > > ----Yahoo! Groups Links
          > >
          > >
          > >
          > >
          >
          >
          > [Non-text portions of this message have been removed]
          >
        • Robert Longson
          This is not going to work, at least not in a browser. See http://hsivonen.iki.fi/no-dtd/ for why it s a bad idea. Best regards Robert.
          Message 4 of 6 , Nov 19, 2012
          • 0 Attachment
            This is not going to work, at least not in a browser. See http://hsivonen.iki.fi/no-dtd/ for why it's a bad idea.

            Best regards

            Robert.

            --- In svg-developers@yahoogroups.com, Kenneth Nellis <nellisks@...> wrote:
            >
            > I've tried without success to get external entities to work. For example, let's say I want to define "blue" in a shared file as #00247D and then, in multiple, separate SVG files, reference the shared definition (as "&blue;").
            >
            > I get that the SVG document that references the color would pull in the definition with something like the following in its DOCTYPE:
            >
            > <!ENTITY blue SYSTEM "colors.xml">
            >
            > And "blue" would be defined in file colors.xml, but I haven't been able to figure out how to define "blue" in file colors.xml. Suggestions would be most appreciated!
            >
            > Ideally, I wouldn't need separate <!ENTITY….> references in each SVG for each color, but could simply refer (somehow) to colors.xml and pull in all entity definitions in colors.xml.
            >
            > —Ken Nellis
            >
          • Kenneth N
            I appreciate the response, Robert. I get why to avoid DTDs, but I wasn t aware that external entities had to be defined in a DTD. The syntax for importing an
            Message 5 of 6 , Dec 1, 2012
            • 0 Attachment
              I appreciate the response, Robert. I get why to avoid DTDs, but I wasn't aware that external entities had to be defined in a DTD. The syntax for importing an external entity reference...

              <!ENTITY blue SYSTEM "colors.xml">

              ...suggests a plain-vanilla XML file, not a DTD. Am I wrong about this?

              â€"Ken Nellis

              --- In svg-developers@yahoogroups.com, "Robert Longson" <longsonr@...> wrote:
              >
              > This is not going to work, at least not in a browser. See http://hsivonen.iki.fi/no-dtd/ for why it's a bad idea.
              >
              > Best regards
              >
              > Robert.
              >
              > --- In svg-developers@yahoogroups.com, Kenneth Nellis <nellisks@> wrote:
              > >
              > > I've tried without success to get external entities to work. For example, let's say I want to define "blue" in a shared file as #00247D and then, in multiple, separate SVG files, reference the shared definition (as "&blue;").
              > >
              > > I get that the SVG document that references the color would pull in the definition with something like the following in its DOCTYPE:
              > >
              > > <!ENTITY blue SYSTEM "colors.xml">
              > >
              > > And "blue" would be defined in file colors.xml, but I haven't been able to figure out how to define "blue" in file colors.xml. Suggestions would be most appreciated!
              > >
              > > Ideally, I wouldn't need separate <!ENTITY�.> references in each SVG for each color, but could simply refer (somehow) to colors.xml and pull in all entity definitions in colors.xml.
              > >
              > > �Ken Nellis
              > >
              >
            • Marty Sullivan
              While you would be importing an xml file, you are doing so via a DTD. That specific function is probably not supported by browsers. ... [Non-text portions of
              Message 6 of 6 , Dec 1, 2012
              • 0 Attachment
                While you would be importing an xml file, you are doing so via a DTD. That
                specific function is probably not supported by browsers.

                On Sat, Dec 1, 2012 at 10:12 AM, Kenneth N <nellisks@...> wrote:

                > **
                >
                >
                > I appreciate the response, Robert. I get why to avoid DTDs, but I wasn't
                > aware that external entities had to be defined in a DTD. The syntax for
                > importing an external entity reference...
                >
                > <!ENTITY blue SYSTEM "colors.xml">
                >
                > ...suggests a plain-vanilla XML file, not a DTD. Am I wrong about this?
                >
                > ��"Ken Nellis
                >
                >
                > --- In svg-developers@yahoogroups.com, "Robert Longson" <longsonr@...>
                > wrote:
                > >
                > > This is not going to work, at least not in a browser. See
                > http://hsivonen.iki.fi/no-dtd/ for why it's a bad idea.
                > >
                > > Best regards
                > >
                > > Robert.
                > >
                > > --- In svg-developers@yahoogroups.com, Kenneth Nellis <nellisks@> wrote:
                > > >
                > > > I've tried without success to get external entities to work. For
                > example, let's say I want to define "blue" in a shared file as #00247D and
                > then, in multiple, separate SVG files, reference the shared definition (as
                > "&blue;").
                > > >
                > > > I get that the SVG document that references the color would pull in
                > the definition with something like the following in its DOCTYPE:
                > > >
                > > > <!ENTITY blue SYSTEM "colors.xml">
                > > >
                > > > And "blue" would be defined in file colors.xml, but I haven't been
                > able to figure out how to define "blue" in file colors.xml. Suggestions
                > would be most appreciated!
                > > >
                > > > Ideally, I wouldn't need separate <!ENTITY���.> references in each SVG
                > for each color, but could simply refer (somehow) to colors.xml and pull in
                > all entity definitions in colors.xml.
                > > >
                > > > ���Ken Nellis
                > > >
                > >
                >
                >
                >


                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.