Commit b3744004 authored by Daniel Veillard's avatar Daniel Veillard

fixed a problem in push mode when attribute contains unescaped '>'

* parser.c: fixed a problem in push mode when attribute contains
  unescaped '>' characters, fixes bug #134566
* test/att6 result//att6*: added the test to the regression suite
Daniel
parent 965983a5
Wed Feb 18 15:20:42 CET 2004 Daniel Veillard <daniel@veillard.com>
* parser.c: fixed a problem in push mode when attribute contains
unescaped '>' characters, fixes bug #134566
* test/att6 result//att6*: added the test to the regression suite
Tue Feb 17 17:26:31 CET 2004 Daniel Veillard <daniel@veillard.com>
* valid.c: removing a non-linear behaviour from ID/IDREF raised
......
......@@ -9030,7 +9030,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
}
if (!terminate) {
if (ctxt->progressive) {
if ((lastgt == NULL) || (ctxt->input->cur > lastgt))
/* > can be found unescaped in attribute values */
if ((lastlt == NULL) || (ctxt->input->cur >= lastlt))
goto done;
} else if (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0) {
goto done;
......
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns:ccts="urn:oasis:names:tc:ubl:CoreComponentParameters:1.0:0.70" xmlns:cct="urn:oasis:names:tc:ubl:CoreComponentTypes:1.0:0.70" xmlns:cat="urn:oasis:names:tc:ubl:CommonAggregateTypes:1.0:0.70" xmlns="urn:oasis:names:tc:ubl:Invoice:1.0:0.70">
<cat:ReferencedOrder>
<cat:SellersOrderID schemeID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeID" schemeAgencyID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeAgencyID" schemeVersionID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeVersionID" schemeAgencySchemeID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeAgencySchemeID" schemeAgencySchemeAgencyID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeAgencySchemeAgencyID" schemeDataURI="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeDataURI" schemeURI="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeURI" UID="pvalue-&gt;ReferencedOrder.SellersOrderID.UID" UIDRef="pvalue-&gt;ReferencedOrder.SellersOrderID.UIDRef" UIDRefs="pvalue-&gt;ReferencedOrder.SellersOrderID.UIDRefs0" language="pvalue-&gt;ReferencedOrder.SellersOrderID.language">pvalue-&gt;ReferencedOrder.SellersOrderID</cat:SellersOrderID>
</cat:ReferencedOrder>
</Invoice>
0 1 Invoice 0 0
1 14 #text 0 1
1 1 cat:ReferencedOrder 0 0
2 14 #text 0 1
2 1 cat:SellersOrderID 0 0
3 3 #text 0 1 pvalue->ReferencedOrder.SellersOrderID
2 15 cat:SellersOrderID 0 0
2 14 #text 0 1
1 15 cat:ReferencedOrder 0 0
1 14 #text 0 1
0 15 Invoice 0 0
SAX.setDocumentLocator()
SAX.startDocument()
SAX.startElement(Invoice, xmlns:ccts='urn:oasis:names:tc:ubl:CoreComponentParameters:1.0:0.70', xmlns:cct='urn:oasis:names:tc:ubl:CoreComponentTypes:1.0:0.70', xmlns:cat='urn:oasis:names:tc:ubl:CommonAggregateTypes:1.0:0.70', xmlns='urn:oasis:names:tc:ubl:Invoice:1.0:0.70')
SAX.characters(
, 4)
SAX.startElement(cat:ReferencedOrder)
SAX.characters(
, 7)
SAX.getEntity(gt)
SAX.startElement(cat:SellersOrderID, schemeID='pvalue->ReferencedOrder.SellersOrderID.schemeID', schemeAgencyID='pvalue->ReferencedOrder.SellersOrderID.schemeAgencyID', schemeVersionID='pvalue->ReferencedOrder.SellersOrderID.schemeVersionID', schemeAgencySchemeID='pvalue->ReferencedOrder.SellersOrderID.schemeAgencySchemeID', schemeAgencySchemeAgencyID='pvalue->ReferencedOrder.SellersOrderID.schemeAgencySchemeAgencyID', schemeDataURI='pvalue->ReferencedOrder.SellersOrderID.schemeDataURI', schemeURI='pvalue->ReferencedOrder.SellersOrderID.schemeURI', UID='pvalue->ReferencedOrder.SellersOrderID.UID', UIDRef='pvalue->ReferencedOrder.SellersOrderID.UIDRef', UIDRefs='pvalue->ReferencedOrder.SellersOrderID.UIDRefs0', language='pvalue->ReferencedOrder.SellersOrderID.language')
SAX.characters(pvalue-, 7)
SAX.getEntity(gt)
SAX.characters(>, 1)
SAX.characters(ReferencedOrder.SellersOrderID, 30)
SAX.endElement(cat:SellersOrderID)
SAX.characters(
, 4)
SAX.endElement(cat:ReferencedOrder)
SAX.characters(
, 1)
SAX.endElement(Invoice)
SAX.endDocument()
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns:ccts="urn:oasis:names:tc:ubl:CoreComponentParameters:1.0:0.70" xmlns:cct="urn:oasis:names:tc:ubl:CoreComponentTypes:1.0:0.70" xmlns:cat="urn:oasis:names:tc:ubl:CommonAggregateTypes:1.0:0.70" xmlns="urn:oasis:names:tc:ubl:Invoice:1.0:0.70">
<cat:ReferencedOrder>
<cat:SellersOrderID schemeID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeID" schemeAgencyID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeAgencyID" schemeVersionID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeVersionID" schemeAgencySchemeID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeAgencySchemeID" schemeAgencySchemeAgencyID="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeAgencySchemeAgencyID" schemeDataURI="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeDataURI" schemeURI="pvalue-&gt;ReferencedOrder.SellersOrderID.schemeURI" UID="pvalue-&gt;ReferencedOrder.SellersOrderID.UID" UIDRef="pvalue-&gt;ReferencedOrder.SellersOrderID.UIDRef" UIDRefs="pvalue-&gt;ReferencedOrder.SellersOrderID.UIDRefs0" language="pvalue-&gt;ReferencedOrder.SellersOrderID.language">pvalue-&gt;ReferencedOrder.SellersOrderID</cat:SellersOrderID>
</cat:ReferencedOrder>
</Invoice>
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns:ccts="urn:oasis:names:tc:ubl:CoreComponentParameters:1.0:0.70" xmlns:cct="urn:oasis:names:tc:ubl:CoreComponentTypes:1.0:0.70" xmlns:cat="urn:oasis:names:tc:ubl:CommonAggregateTypes:1.0:0.70" xmlns="urn:oasis:names:tc:ubl:Invoice:1.0:0.70">
<cat:ReferencedOrder>
<cat:SellersOrderID schemeID="pvalue->ReferencedOrder.SellersOrderID.schemeID" schemeAgencyID="pvalue->ReferencedOrder.SellersOrderID.schemeAgencyID" schemeVersionID="pvalue->ReferencedOrder.SellersOrderID.schemeVersionID" schemeAgencySchemeID="pvalue->ReferencedOrder.SellersOrderID.schemeAgencySchemeID" schemeAgencySchemeAgencyID="pvalue->ReferencedOrder.SellersOrderID.schemeAgencySchemeAgencyID" schemeDataURI="pvalue->ReferencedOrder.SellersOrderID.schemeDataURI" schemeURI="pvalue->ReferencedOrder.SellersOrderID.schemeURI" UID="pvalue->ReferencedOrder.SellersOrderID.UID" UIDRef="pvalue->ReferencedOrder.SellersOrderID.UIDRef" UIDRefs="pvalue-&gt;ReferencedOrder.SellersOrderID.UIDRefs0" language="pvalue->ReferencedOrder.SellersOrderID.language">pvalue-&gt;ReferencedOrder.SellersOrderID</cat:SellersOrderID>
</cat:ReferencedOrder>
</Invoice>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment