Results 1 to 7 of 7

Thread: [solved by all who replied] xhtml - can't insert ©

  1. #1

    Thread Starter
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552

    Resolved [solved by all who replied] xhtml - can't insert ©

    how do i do inserting copyright symbol?
    Code:
    <!DOCTYPE html PUBLIC ""
    "" >
    <html xmlns="http://www.w3.org/1999/xhtml">
    <body>
    &copy; Copyleft 2004. Brown Monkey. All rights are not reserved.
    </body>
    </html>
    gives an error
    Code:
    XML Parsing Error: undefined entity 
    Location: file:///D:/My%20Documents/My%20Project/HTML/TEMP/document1.xhtml
    Line Number 5, Column 1:
    
    &copy; Copyleft 2004. Brown Monkey. All rights are not reserved. 
    ^
    Last edited by brown monkey; Sep 22nd, 2004 at 04:56 AM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    &amp;copy;

    ?

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Or why don't you do it directly, ©

  4. #4
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    I inserted the infinity symbol like that not long ago. I didn't get any errors though. I'd guess that you need that inside a <p> or some other tag like that,
    Have I helped you? Please Rate my posts.

  5. #5
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    The XML parser you use to check your xhtml doesn't understand that entity, as it says. So for html the correct way to insert a copyright symbol is indeed &copy; but for compliance with your XML parser you might want to insert the hexidecimal value for the symbol.

    Also you should always define a doctype:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<title>Copyright test</title>
    </head>
    
    <body>
            &#169; Copyleft 2004. Brown Monkey. All rights are not reserved.
    </body>
    </html>
    edit: the board parses it, so it should be
    Code:
    & # 1 6 9;
    Without any spaces.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Actually, the real problem was (depending on the XML parser you were using) that you were omitting the DTD ID and location. The entity & copy; is defined in the DTD. Without that, it doesn't exist, thus the parser error.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7

    Thread Starter
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552


    i'm dumb. cornedbee is right and all you guys are right. i'm the only one who is doing the wrong thing. hehehe. thanks to all of you who makes me feel happy with all the blah blah.... hehehe. thanks again. it's defined in the dtd, so without it &copy; doesn't exist... right. thank you all especially to my dear mendhak.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width