1. XML stands for Extensible Mark-up Language and CSS stands for Cascading Style Sheets
2. The line bellow is not well formed because the end tag
“</i>”
should be placed right before the
“</b>”
tag. The tags bellow have not been nested properly.
<b><i>This text is bold and italic</b></i>
3. The code bellow is not well formed, as there is no root element. There should be a root element, which contains all the other tags which does not apply in this case.
<?xml version= “1.0” ?>
<greeting>
Hello, world!
</greeting>
<greeting>
Hello Mars too!
</greeting>
Longer Questions
1. Bellow is an extract of an XML document containing details of the course that I am currently studying along with details of the time and of the room number in which I am currently in.
<subject start_time=”9” end_time=”12.30”>
<course_name>cmt3315</course_name>
<building_name>Hatchcroft</building_name>
<room_number>h101</room_number>
</subject>
2.
• There is an attribute value in the end tag of </price>. Attributes should be placed in the start tag.
• The “<price>” start tag does not match the “</Price>” end tag. Tags are case sensitive and therefore will need to be the same.
• The <price> and <discount> tags are not nested properly. If a new tag is placed within a parent tag, then it must also be ended within the parent tag.
• The “<author” start tag is missing a “>” and also contains a comment which is not allowed in xml. Comments cannot be placed within tags.
• Finally the root element “<bookstore>” does not have a closing tag
3.
<!DOCTYPE memo
[
<!ELEMENT memo (to,from,heading,body,date,securityClass)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ATTLIST memo serialnumber ID DATA #REQUIRED>
]>
Lecture Reflection-WEEK 4 - Entities
During week 4, we were studying entities. Entity’s are declared at the top of the document has text assigned to it. This text can then be displayed anywhere in the document where the entity is used and as a result saves a lot of typing. Any single entity name can take the place of a batch of text. It is also very useful if there are certain bits of text within a document that needs to be changed regularly.
Bellow is an example of an entity declaration: -
<! ENTITY legalWaffle “not excluding rights of hudibras and persiflage heretoforeunder specified”> ] >
The name “legalWaffle” from the above statement is assigned a piece of text. This piece of text is now viewable anywhere within the document where the name “&legalWaffle” appears.
http://www.ronnysmarket.com/
http://www.ronnysmarket.com/catalog/main
No comments:
Post a Comment