[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Do XML Schema processors do backtracking?
- From: Roger L Costello <costello@mitre.org>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Tue, 19 Apr 2022 11:33:16 +0000
Hi Folks,
I am reading a compiler book [1] and it says this:
"An important practical criterion is that a parser should not backtrack. At all stages it should operate deterministically. A number of authors have described backtracking parsers, but those are rarely used in practice. It is difficult to undo semantic actions carried out by the parser as is necessary if it has to backtrack."
Do XML Schema processors do backtracking? For instance, if the XML document has this:
<name>John Doe</name>
and the XML Schema has this choice:
<xs:choice>
<xs:element name="id" type="xs:int" />
<xs:element name="name" type="xs:string" />
</xs:choice>
Does the XML Schema processor try the first branch of the choice, backtrack, and then try the second branch?
/Roger
[1] Introduction to Compiling Techniques by J.R. Bennett, see bottom of page 80.
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]