Wednesday, 4 November 2009

week 6

1.
DTD define legal Elements, attributes, nesting and all other layout structure for XML document, which the xml have to follow to be a validated xml document. If xml implement DTD and does not follow the structure it will not be validate even if it is well formed.
2. If XML document contains Arabic characters, the declaration of XML must start with

Because UTF-8 support Arabic characters
3. Yes it is possible to use binary in XML document. As with all elements the Xml tag which holds the binary data has to be informed the type of data which is been passed to parser and all ambiguous characters must be removed from the binary code to eliminate confusion such as “<”. It is not always a good idea to have a binary code within XML document speciality if the binary code is big. The other way around this is to have external binary graphic file which you can be access by using Binary DATA as objects.
Example how to access binary fine with XML
< picture >
<picture id="ViaValdres2">
<caption>valley </caption >
<full-image width="1280" height="960"> ViaValdres2.jpg </full-image>
<image width="740" height="555"> ViaValdres2p.jpg</image>
<small-image width="240" height="180"> ViaValdres2t.jpg< /small-image>
</picture>


Longer Questions

1 a
Because the word “with” is not a Russian phrase and the document is design to translate English phrase to Russian not the other way around.
B
< ? XML version=”1.0”?
< —This XML document hold English phrase and its Russian equivalent-->

<!DOCTYPE Phrasebook [
<! ELEMENT Phrasebook (Section)>
<! ELEMENT Section (Section-Title, Phrase-Group)>
<! ELEMENT Section-Title(#PCDATA)>] >

No comments:

Post a Comment