• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions from www.witscale.com

 
Sergey Gribok
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are these answers for the questions really correct?
I have greate doubts.
As far as I understand the answer on Q 25 is false, the answers on Q 22 are 1 and 3

Q 25. The XML schema built-in datatypes ID and IDREF must only be used with attribute
declarations.

True.

False.

Its true.
Certain datatypes in XML schema are reserved for attributes only.
Please refer XML Schema specification by W3C for more details.

Q 22. Which of the following are processing instructions?

<?xml-stylesheet type="text/xsl" href="style.xsl" ?>

<?xml version="1.0" ?>

<?xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"?>

<!DOCTYPE name SYSTEM "" >

<?xml-stylesheet type="text/xsl" href="style.xsl" >

<?xml version="1.0" encoding="UTF-8"?>

Correct answer is 1,2,5 and 6.
Option3 is incorrect <xsl:stylesheet> is not processing instruction and does not
start with ?. Option4 is DTD declaration and it too is not a processing instruction.
Processing instructions is xml convention for passing instructions from document
directly through parser to 'presentation software' to instruct it about 'how to
process the document or part of it?'

[ July 26, 2002: Message edited by: Sergey Gribok ]
[ July 26, 2002: Message edited by: Sergey Gribok ]
 
Rakesh Gudur
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
Answer for Q25 is "true" because ID and IDREFs are used with attributes only.
And for answer to Q22 check the discussion topic "xml declaration a PI?" created by Shobha Ramchandran.
Good luck,
Rakesh.
 
Sergey Gribok
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But in "XML Bible" you can read

XML data types
The next batch of schema data types should be quite familiar. These are the types related to XML constructs themselves. Most of these types match attribute types in DTDs such as NMTOKENS or IDREF. The difference is that with schemas these types can be applied to both elements and attributes.

Except this Xalan allows to use ID and IDREF with elements.
[ July 30, 2002: Message edited by: Sergey Gribok ]
 
ZEESHAN AZIZ
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
About Q22, I think only option 6 is correct. Reason being,
"XML DECLARTION IS NOT A PI". (David Hunter, Begining XML , Page 51)
This disqualifies option A and B.
And For option 5, it is not ending with a ?> which is a prerequisite for PI. So that makes only option 6 correct.
Expert comments please.
 
Svetlana Petrova
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Q22, to me only the first answer seems OK, provided we agree on that XML is not a PI, it's a declaration.
 
Himal Chuli
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To me, option First would be the correct answer too. could anyone confirm it?
himal
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Option 1 for me too
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Q 25, the answer should be true.
Read here: 3.3.8 ID
For compatibility (see Terminology (�1.4)) ID should be used only on attributes.

Some parsers let it go does not make it correct!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic