% in ENTITY declaration

Discussion in 'XML' started by Ronald Fischer, Jul 30, 2003.

  1. Could someone explain to me what is the difference between

    <!ENTITY % Foo 'Bar' >

    and

    <!ENTITY Foo 'Bar' >

    From my understanding, the "macro" Foo has to be referenced in
    the first case by %Foo; and in the second case by &Foo; , but
    I don't believe that this is the sole purpose of the '%' in
    the former declaration.

    Ronald
     
    Ronald Fischer, Jul 30, 2003
    #1
    1. Advertising

  2. "Ronald Fischer" <> wrote in message
    news:...
    > Could someone explain to me what is the difference between
    >
    > <!ENTITY % Foo 'Bar' >
    >
    > and
    >
    > <!ENTITY Foo 'Bar' >
    >


    1st one is parameter entity and is used within DTD i.e.

    <!DOCTYPE rootnode [
    <!ENTITY % HTMLlat1 SYSTEM "xhtml-lat1.ent">
    %HTMLlat1;
    ]>

    includes the contents of xhtml-lat1.ent (entity declarations mainly)
    into DTD. Outside DTD %HTMLlat1; is just ordinary text and won't be
    expanded.
    see for example http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
    for more parameter entity usage, also use google.

    2nd is normal internal entity that should appear within element content and
    attributes.
    i.e. <TAG ATT="&Foo;">&Foo;</TAG>

    Toni Uusitalo
     
    Toni Uusitalo, Jul 30, 2003
    #2
    1. Advertising

  3. "Toni Uusitalo" <> wrote in message news:<e2KVa.3143$>...
    > see for example http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd


    Thanks a lot.

    BTW, are you aware that the From: address in your header is invalid?
    Mail sent to it bounces with

    550 5.1.2 <>... Host unknown (Name
    server: luukkudot.com: host not found)

    Ronald
     
    Ronald Fischer, Jul 30, 2003
    #3
  4. "Ronald Fischer" <> wrote in message
    news:...
    > "Toni Uusitalo" <> wrote in message

    news:<e2KVa.3143$>...
    > > see for example http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

    >
    > Thanks a lot.
    >
    > BTW, are you aware that the From: address in your header is invalid?
    > Mail sent to it bounces with
    >
    > 550 5.1.2 <>... Host unknown (Name
    > server: luukkudot.com: host not found)


    Yes! I'm aware of that! You should make some funny typos for your address
    too,
    haven't you heard a story about horrible spammers that drink your blood and
    fill
    your mailbox with evil filth in return ;-)

    Cheers,
    Toni Uusitalo
     
    Toni Uusitalo, Jul 30, 2003
    #4
  5. OT, but interesting - bogus mail header (was : % in ENTITY declaration)

    "Toni Uusitalo" <> wrote in message news:<zyPVa.3246$>...
    > "Ronald Fischer" <> wrote in message
    > news:...
    > > BTW, are you aware that the From: address in your header is invalid?
    > > Mail sent to it bounces with

    > Yes! I'm aware of that! You should make some funny typos for your address
    > too,
    > haven't you heard a story about horrible spammers that drink your blood and
    > fill
    > your mailbox with evil filth in return ;-)


    For sure, yes, but I believe there are better ways to achieve the goal:
    Note that practically *all* address harvesters access only the From:
    address of the messages, so one possibility is to use a From: address
    which is invalid in an obvious way, and put your true return address
    in a Reply-To: header. When posting using a Newsreader, I use this approach.
    It is important that you write the invalid From: address in a way that
    it does not increase the load on the Net, if spammers try to send spam
    to this address. You typically do this by using an invalid TLD. In your
    case, you could use lid

    When I have, for whatever reason, to use Google (or a similar service, which
    does not allow me to use an invalid From: address), I use a free mail
    account created just for that purpose. In my case, I use an account at
    http://fastmail.fm/ , because this Web based mail reader is fast and
    allows me to quickly erase all the spam. Note that I don't expect people
    to answer by email anyway, so it does not harm that I clean up my fastmail
    account only once a month or so.

    If OTOH I would expect to get responses by email, I would say so in my
    signature line. So far, I have never detected a case where I received spam
    from posting my real address in a signature (or in the Reply-To: header),
    but if you are really paranoid about this, you could post the address of
    a mail forwarding service, which simply forwards to your real account, and
    if you really start receiving spam, it is easy to use a new forwarder and
    set up a suitable autoresponder on the old one.

    Ronald
     
    Ronald Fischer, Jul 31, 2003
    #5
  6. Re: OT, but interesting - bogus mail header (was : % in ENTITY declaration)

    "Toni Uusitalo" <> wrote in message news:<ko6Wa.3446$>...
    > Ok. Thanks for the tips Ronald. My new From address should be better now and
    > doesn't
    > increase the net load?


    That's correct (though I, personally, would use a TLD which is more
    easily visible to be illegal than "kom" is ... for example, "illegal"
    or "bogus" or "eat_slugs_you_spammer" would probably be a better
    choice).

    The problem with your *present* posting is not the From address
    anymore, but that you use the fake From address also in the
    Reply-To: header, and this is a bad idea. Remember
    that Reply-To: headers are nearly never harvested, so you should
    put there a valid address (though not necessarily your "primary"
    address).

    Ronald
     
    Ronald Fischer, Aug 1, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thomas Sommer

    Entity declaration in DTD

    Thomas Sommer, Sep 8, 2004, in forum: XML
    Replies:
    3
    Views:
    501
    Richard Tobin
    Sep 8, 2004
  2. Samuel van Laere

    Entity Name or Entity Number?

    Samuel van Laere, Feb 24, 2007, in forum: HTML
    Replies:
    4
    Views:
    1,743
    Jukka K. Korpela
    Feb 24, 2007
  3. markla
    Replies:
    1
    Views:
    581
    Steven Cheng
    Oct 6, 2008
  4. Norm
    Replies:
    3
    Views:
    2,884
  5. ThatsIT.net.au

    Entity, problem with entity key

    ThatsIT.net.au, Sep 6, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    1,246
    ThatsIT.net.au
    Sep 7, 2009
Loading...

Share This Page