diff --git a/src/mezz/codec-xml.r b/src/mezz/codec-xml.r index 251d97e6c6..d9803fc195 100644 --- a/src/mezz/codec-xml.r +++ b/src/mezz/codec-xml.r @@ -6,8 +6,8 @@ REBOL [ Title: "A more XML 1.0 compliant set of XML parsing tools." File: %codec-xml.r - Date: 19-Nov-2018 - Version: 0.8.0 + Date: 24-Apr-2020 + Version: 0.8.1 Author: ["Gavin F. McKenzie" "Oldes"] Email: %brianwisti--yahoo--com Purpose: { @@ -137,6 +137,7 @@ REBOL [ @@TBD: say more here } History: [ + 0.8.1 { Oldes: fixed Prolog parsing in some cases} 0.8.0 { Oldes: used original script as a Rebol3 codec} 0.7.6 { Version from 1-jul-2009 downloaded from rebol.org} 0.7.4 { Fixed a defect to allow optional space around @@ -374,26 +375,14 @@ register-codec [ ; block-handler: make xml-parse-handler [ xml-doc: copy [] - xml-block: copy [] + xml-block: none xml-content: copy "" - start-document: func [ - ][ + start-document: does [ ; ; Seed the document ; - xml-block: reduce copy/deep [ - 'document [ - version none - encoding none - standalone none - doctype none - pubid none - sysid none - subset none - ] - none - ] + xml-block: reduce ['document copy #() none] ] xml-decl: func [ version-info [string! none!] @@ -821,15 +810,12 @@ register-codec [ any xmlMisc opt [xmlDocTypeDecl any xmlMisc] ] - xmlDocTypeDecl: [ "" (handler/document-type document-type @@ -907,16 +893,14 @@ register-codec [ ] ) ] - xmlExternalID: [ ["SYSTEM" xmlSpace xmlSystemLiteral] | - ["PUBLIC" xmlSpace xmlPubIDLiteral - xmlSpace xmlSystemLiteral - ] + xmlExternalID: [ ["SYSTEM" xmlS xmlSystemLiteral] | + ["PUBLIC" xmlS xmlPubIDLiteral xmlS xmlSystemLiteral] ] - xmlSystemLiteral: [ [#"^"" copy system-id to #"^"" #"^""] | - [#"'" copy system-id to #"'" #"'"] + xmlSystemLiteral: [ [#"^"" copy system-id to #"^"" 1 skip] | + [#"'" copy system-id to #"'" 1 skip] ] - xmlPubIDLiteral: [ [#"^"" copy public-id to #"^"" #"^""] | - [#"'" copy public-id to #"'" #"'"] + xmlPubIDLiteral: [ [#"^"" copy public-id to #"^"" 1 skip] | + [#"'" copy public-id to #"'" 1 skip] ] xmlNDataDecl: [xmlS "NDATA" xmlS xmlNameProd] xmlCDSect: [ " + + + + + + + Subjects available in Mechanical Engineering. + 2.303 + Fluid Mechanics + + 1.001 + Mathematics + + 4 hours per week (lectures and tutorials) for one + semester. + tutorial assignments and one 2hr exam at end of + course. + + Fluid statics. The Bernoulli equation. Energy equation. Momentum + equation. Differential Continuity equation. Differential Energy + equation. Differential Momentum equation. Dimensional Analysis. + Similitude. Laminar flow. Turbulent flow. Lift and Drag. Boundary + layer theory. + + + Foobar + The Study of Fluid Mechanics + + \ No newline at end of file diff --git a/src/tests/units/files/test2.xml b/src/tests/units/files/test2.xml new file mode 100644 index 0000000000..d03b80466a --- /dev/null +++ b/src/tests/units/files/test2.xml @@ -0,0 +1,13 @@ + + + + +A typical HTML file + + + This is the typical structure of an HTML file. It follows + the notation of the HTML 4.0 specification, including tags + that have been deprecated (hence the "transitional" label). + + \ No newline at end of file