Results 1 to 2 of 2

Thread: Hello, newbie needs help!

  1. #1
    Join Date
    May 2008
    Posts
    1

    Hello, newbie needs help!

    Hi, i'm designing an xml site for my uni work and I have put some entities and an attribute list into the dtd. I'm trying to use my entities as a text replacement in the attribute "price currency" in the dtd but it won't work. It's the currency section. Can anyone explain why the price comes up but not the currency sign? the page does preview in ie. Basically I want it to show a £ or a $ or a € infront of the price.

    this is the xml

    <header>
    <title>CD Bay Incorporated Music Bidding</title>
    </header>

    <genre>Pop Music</genre>

    <artist>
    <firstname>Amy</firstname>
    <surname>Winehouse</surname>
    </artist>

    <album>Back to Black</album>

    <label>Island</label>

    <price currency="&gbp;">7.98</price>

    <delivery>&del;</delivery>

    <seller>
    <firstname>Ted</firstname>
    <surname>Kord</surname>
    </seller>

    <phone>0191 200 3456</phone>

    <mobile>07564 33333</mobile>

    <description>Amy Winehouse's second album, Back to Black,
    is one of the finest soul albums, British or otherwise,
    to come out for years. Frank, her first album, was a sparse
    and stripped-down affair; Back to Black, meanwhile, is neither
    of these things. This time around, she's taken her inspiration
    from some of the classic 1960's girl groups like the
    Supremes and the Shangri-Las, a sound particularly suited to her
    textured vocal delivery, while adding a contemporary songwriting
    sensibility.</description>

    and this is the dtd

    <!ELEMENT musicbidding (header, genre, artist, album, label, price, delivery, seller, phone, mobile, description)>
    <!ELEMENT musicbidding (#PCDATA)>
    <!ELEMENT header (#PCDATA)>
    <!ELEMENT genre (#PCDATA)>
    <!ELEMENT artist (FIRSTNAME, SURNAME)>
    <!ELEMENT album (#PCDATA)>
    <!ELEMENT label (#PCDATA)>
    <!ELEMENT price (#PCDATA)>
    <!ELEMENT delivery (#PCDATA)>
    <!ELEMENT seller (FIRSTNAME, SURNAME)>
    <!ELEMENT phone (#PCDATA)>
    <!ELEMENT mobile (#PCDATA)>
    <!ELEMENT description (#PCDATA)>
    <!ENTITY del "Free UK Delivery">
    <!ENTITY gbp "£">
    <!ENTITY usd "$">
    <!ENTITY eur "€">

    <!ATTLIST price currency (gbp|usd|eur) #REQUIRED>

  2. #2
    Join Date
    Dec 2006
    Location
    Singapore
    Posts
    74
    hmm http://www.ascii.cl/htmlcodes.htm lists the html for $ as "&#36;" without the inverted commas so perhaps u wanna try that?

    A quick search online reveals that not all browsers accept the Euro symbol though I'm not too sure about it now.

Similar Threads

  1. Newbie question re: forms
    By apuffer in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 11 Dec 2006, 01:30 AM

Posting Permissions

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