1 reply [Last post]
meital_r
meital_r's picture
Offline
newbie
Last seen: 3 years 25 weeks ago
Timezone: GMT+3
Joined: 2016-04-23
Posts: 1
Points: 2

Hey all, can anyone say what's wrong here? The css link doesn't work for some reason that I can't find..

Thanks!!

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="nutrition.css"?>
 
<!DOCTYPE nutrition [
  <!ELEMENT nutrition (fruit*, vegetable*, (nut+|seed+))>
  <!ELEMENT fruit (fname, fseason, fvitamin*, fmineral*)>
  <!ATTLIST fruit group (sweet|sour) #REQUIRED>
  <!ELEMENT fname (#PCDATA)>
  <!ELEMENT fseason (#PCDATA)>
  <!ELEMENT fvitamin (#PCDATA)>
  <!ELEMENT fmineral (#PCDATA)>
  <!ELEMENT vegetable (Vname, Vseason, Vvitamin*, Vmineral*)>
  <!ELEMENT Vname (#PCDATA)>
  <!ELEMENT Vseason (#PCDATA)>
  <!ELEMENT Vvitamin (#PCDATA)>
  <!ELEMENT Vmineral (#PCDATA)>
  <!ELEMENT nut (nname)>
  <!ELEMENT nname (#PCDATA)>
  <!ELEMENT seed (sname)>
  <!ELEMENT sname (#PCDATA)>
]>
 
 
 
<nutrition>
  <fruit group="sweet">
    <fname>watermelon</fname>
    <fseason>summer</fseason>
    <fvitamin>A</fvitamin>
    <fvitamin>B3</fvitamin>
    <fvitamin>E</fvitamin>
    <fmineral>potassiun</fmineral>
    <fmineral>phosphorus</fmineral>
  </fruit>
 
    <fruit group="sweet">
    <fname>pear</fname>
    <fseason>all year</fseason>
    <fvitamin>B17</fvitamin>
    <fmineral>potassiun</fmineral>
    <fmineral>phosphorus</fmineral>
  </fruit>
 
  <fruit group="sour">
    <fname>pineapple</fname>
    <fseason>spring, summer, fall</fseason>
    <fvitamin>C</fvitamin>
    <fmineral>potassiun</fmineral>
  </fruit>
 
  <fruit group="sour">
    <fname>cherries</fname>
    <fseason>summer</fseason>
    <fvitamin>A</fvitamin>
    <fvitamin>B17</fvitamin>
    <fmineral>iron</fmineral>
    <fmineral>magnesium</fmineral>
  </fruit>
 
  <vegetable>
    <Vname>lettuce</Vname>
    <Vseason>all year</Vseason>
    <Vvitamin>A</Vvitamin>
    <Vvitamin>B9</Vvitamin>
    <Vvitamin>K</Vvitamin>
    <Vmineral>iron</Vmineral>
    <Vmineral>magnesium</Vmineral>  
    <Vmineral>potassium</Vmineral> 
    <Vmineral>calcium</Vmineral> 
  </vegetable>
 
  <nut>
    <nname>brazil nut</nname>  
  </nut>
 
  </nutrition>

//mod edit: bbcode added ~gt

helldog2004
helldog2004's picture
Offline
Enthusiast
Netherlands
Last seen: 3 years 10 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2014-03-02
Posts: 205
Points: 239

<?xml-stylesheet

<?xml-stylesheet type="text/css" href="nutrition.css"?>

Hi, you don't need to add the type. By adding xml-stylesheet you are already telling it is a stylesheet.
Also, make sure this xml file is in the same folder as your nutrition.css folder.
If your nutrition.css file is in a different folder (say for example in the folder called css) then you need to change the href to:
<?xml-stylesheet href="css/nutrition.css"?>

Hope this works out for you.

Check Maximum Webdesign for your online solutions