hi,
I need to write an xml document with a dtd and css for an appointment in calender program. The calender has has certain fields such as start time, end time, alarm etc. The fields have certain information such as start_time:1100, end_time:1200 etc
My xml currently looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="calcss.css"?>
<!DOCTYPE Calender SYSTEM "cal.dtd">
<Calender>
<all_day>FALSE</all_day>
<from>
<day> 01</day>
<month>03</month>
<year>06</year>
<time>1100</time>
</from>
<to>
<day>01 </day>
<month>03</month>
<year>06</year>
<time>1200</time>
</to>
<time_zone>London </time_zone>
<repeat> every week</repeat>
<end>4 </end>
<attendees>None</attendees>
<calender>work</calender>
<alarm>
<alarm_type>message with sound</alarm_type>
<before>(time)</before>
</alarm>
<url></Calender>
dtd looks like this :
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT Calender (all_day, from, to, time_zone, repeat, end, attendees, calender, alarm, url)>
<!ELEMENT alarm (alarm_type, before)>
<!ELEMENT alarm_type (#PCDATA)>
<!ELEMENT all_day (#PCDATA)>
<!ELEMENT attendees (#PCDATA)>
<!ELEMENT before (#PCDATA)>
<!ELEMENT calender (#PCDATA)>
<!ELEMENT day (#PCDATA)>
<!ELEMENT end (#PCDATA)>
<!ELEMENT from (day, month, year, time)>
<!ELEMENT month (#PCDATA)>
<!ELEMENT repeat (#PCDATA)>
<!ELEMENT time (#PCDATA)>
<!ELEMENT time_zone (#PCDATA)>
<!ELEMENT to (day, month, year, time)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT year (#PCDATA)>
and css like this:
Calender {
font-style : italic;
font-size : 14;
color : #400040;
text-align : right
}
all_day{
font-weight : bold;
font-size : 30;
}
from {
font-style : underline;
font-size : 50;
}
I have a few questions.
1. In the dtd, instead of just having #PCDATA (which allows any text entry) could I say that it can only be either "yes" or "no" and if so how?
2. How do I make the css display different things on different lines? It's currently just on one line.
Thanks for any help
I need to write an xml document with a dtd and css for an appointment in calender program. The calender has has certain fields such as start time, end time, alarm etc. The fields have certain information such as start_time:1100, end_time:1200 etc
My xml currently looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="calcss.css"?>
<!DOCTYPE Calender SYSTEM "cal.dtd">
<Calender>
<all_day>FALSE</all_day>
<from>
<day> 01</day>
<month>03</month>
<year>06</year>
<time>1100</time>
</from>
<to>
<day>01 </day>
<month>03</month>
<year>06</year>
<time>1200</time>
</to>
<time_zone>London </time_zone>
<repeat> every week</repeat>
<end>4 </end>
<attendees>None</attendees>
<calender>work</calender>
<alarm>
<alarm_type>message with sound</alarm_type>
<before>(time)</before>
</alarm>
<url></Calender>
dtd looks like this :
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT Calender (all_day, from, to, time_zone, repeat, end, attendees, calender, alarm, url)>
<!ELEMENT alarm (alarm_type, before)>
<!ELEMENT alarm_type (#PCDATA)>
<!ELEMENT all_day (#PCDATA)>
<!ELEMENT attendees (#PCDATA)>
<!ELEMENT before (#PCDATA)>
<!ELEMENT calender (#PCDATA)>
<!ELEMENT day (#PCDATA)>
<!ELEMENT end (#PCDATA)>
<!ELEMENT from (day, month, year, time)>
<!ELEMENT month (#PCDATA)>
<!ELEMENT repeat (#PCDATA)>
<!ELEMENT time (#PCDATA)>
<!ELEMENT time_zone (#PCDATA)>
<!ELEMENT to (day, month, year, time)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT year (#PCDATA)>
and css like this:
Calender {
font-style : italic;
font-size : 14;
color : #400040;
text-align : right
}
all_day{
font-weight : bold;
font-size : 30;
}
from {
font-style : underline;
font-size : 50;
}
I have a few questions.
1. In the dtd, instead of just having #PCDATA (which allows any text entry) could I say that it can only be either "yes" or "no" and if so how?
2. How do I make the css display different things on different lines? It's currently just on one line.
Thanks for any help