elena       2002/11/08 15:57:02

  Modified:    java/docs faq-general.xml faq-dom.xml
  Log:
  getElementBy id moving to DOM FAQ
  
  Revision  Changes    Path
  1.28      +1 -13     xml-xerces/java/docs/faq-general.xml
  
  Index: faq-general.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/faq-general.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- faq-general.xml   6 Nov 2002 22:38:18 -0000       1.27
  +++ faq-general.xml   8 Nov 2002 23:57:02 -0000       1.28
  @@ -92,19 +92,7 @@
      </p>
     </a>
    </faq> 
  -<faq title='IDs and XML Schemas'>
  -  <q>Why does getElementById() not always work for documents validated against XML 
Schemas?</q>
  -  <a>
  -   <p>According to the XML Schema specification, an instance document might have
  -more than one <jump href="http://www.w3.org/TR/xmlschema-1/#key-vr";>validation 
root</jump> and 
  -<jump href="http://www.w3.org/TR/xmlschema-1/#cvc-id";>ID/IDREFS</jump> must be 
  -unique only within the context of a particular validation root, meaning that a 
  -document may potentially contain multiple identical ids. In this case, the output 
  -of getElementById() is unspecified. On the other hand, if the document root is 
  -a validation root of the document, getElementById() should work as expected.
  -    </p>
  -  </a>
  - </faq>
  +
    
   <faq title='PSVI'>
     <q>How do I get access to the PSVI?</q>
  
  
  
  1.3       +36 -0     xml-xerces/java/docs/faq-dom.xml
  
  Index: faq-dom.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/faq-dom.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- faq-dom.xml       8 Nov 2002 23:39:53 -0000       1.2
  +++ faq-dom.xml       8 Nov 2002 23:57:02 -0000       1.3
  @@ -344,5 +344,41 @@
       </a>
     </faq>
   
  +<faq title='Making getElementById() work'>
  +  <q>Why does not getElementById()  work for documents validated against XML 
Schemas?</q>
  +  <a>
  +  <p>Make sure the <link idref='features' anchor="validation">validation 
feature</link> and the 
  +<link idref='features' anchor="validation.schema">schema feature</link> are turned 
on before you parse a document.
  +   
  +  </p>
  +  <p>Xerces does not <em>yet</em> provide a way to set an ID attribute after the 
document was loaded.
  +  </p>
  +  <!--
  +   <p>According to the XML Schema specification, an instance document might have
  +more than one <jump href="http://www.w3.org/TR/xmlschema-1/#key-vr";>validation 
root</jump> and 
  +it specifies that the 
  +<jump href="http://www.w3.org/TR/xmlschema-1/#cvc-id";>ID/IDREFS</jump> must be 
  +unique within the context of a particular validation root, meaning that a 
  +document may contain multiple identical ids. In this case, the output 
  +of getElementById() is unspecified. On the other hand, if the document root is 
  +a validation root of the document, getElementById() should work as expected.
   
  +During loading there is no way (currently) so specify validation roots
  +in Xerces, thus Xerces always treats the document root as validation
  +root. 
  +However, in the future it is possible to give XPath expression
  +specifying at what elements validation should start. For example:
  +
  +<documentRoot> 
  +<validationRoot_1>Some Data</validationRoot_1>
  +<validationRoot_2>Some Data</validationRoot_2>
  +<documentRoot>
  +
  +In this case, ID/IDREF must be unique in the scope of validationRoot_1
  +or in scope of validationRoot_2, however ID/IDREF table might not be
  +unique for documentRoot.
  +-->
  +  
  +  </a>
  + </faq>
   </faqs>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to