diff --git a/DOMTEST b/DOMTEST index 312b215..3e81afe 100644 --- a/DOMTEST +++ b/DOMTEST @@ -1,550 +1,552 @@ -0/525 attrcreatedocumentfragment.xml -1/525 attrcreatetextnode.xml -2/525 attrcreatetextnode2.xml -3/525 attrdefaultvalue.xml -4/525 attreffectivevalue.xml -5/525 attrentityreplacement.xml -6/525 attrname.xml -7/525 attrnextsiblingnull.xml -8/525 attrnotspecifiedvalue.xml -9/525 attrparentnodenull.xml -10/525 attrprevioussiblingnull.xml -11/525 attrsetvaluenomodificationallowederr.xml + +#P"/home/david/2001/DOM-Test-Suite/tests/level1/core/" +0/808 attrcreatedocumentfragment.xml +1/808 attrcreatetextnode.xml +2/808 attrcreatetextnode2.xml +3/808 attrdefaultvalue.xml +4/808 attreffectivevalue.xml +5/808 attrentityreplacement.xml +6/808 attrname.xml +7/808 attrnextsiblingnull.xml +8/808 attrnotspecifiedvalue.xml +9/808 attrparentnodenull.xml +10/808 attrprevioussiblingnull.xml +11/808 attrsetvaluenomodificationallowederr.xml implementationAttribute expandEntityReferences not supported, skipping test -12/525 attrsetvaluenomodificationallowederrEE.xml -13/525 attrspecifiedvalue.xml -14/525 attrspecifiedvaluechanged.xml -15/525 attrspecifiedvalueremove.xml -16/525 cdatasectiongetdata.xml +12/808 attrsetvaluenomodificationallowederrEE.xml +13/808 attrspecifiedvalue.xml +14/808 attrspecifiedvaluechanged.xml +15/808 attrspecifiedvalueremove.xml +16/808 cdatasectiongetdata.xml implementationAttribute coalescing not supported, skipping test -17/525 cdatasectionnormalize.xml -18/525 characterdataappenddata.xml -19/525 characterdataappenddatagetdata.xml -20/525 characterdataappenddatanomodificationallowederr.xml -21/525 characterdataappenddatanomodificationallowederrEE.xml -22/525 characterdatadeletedatabegining.xml -23/525 characterdatadeletedataend.xml -24/525 characterdatadeletedataexceedslength.xml -25/525 characterdatadeletedatagetlengthanddata.xml -26/525 characterdatadeletedatamiddle.xml -27/525 characterdatadeletedatanomodificationallowederrEE.xml -28/525 characterdatagetdata.xml -29/525 characterdatagetlength.xml -30/525 characterdataindexsizeerrdeletedatacountnegative.xml +17/808 cdatasectionnormalize.xml +18/808 characterdataappenddata.xml +19/808 characterdataappenddatagetdata.xml +20/808 characterdataappenddatanomodificationallowederr.xml +21/808 characterdataappenddatanomodificationallowederrEE.xml +22/808 characterdatadeletedatabegining.xml +23/808 characterdatadeletedataend.xml +24/808 characterdatadeletedataexceedslength.xml +25/808 characterdatadeletedatagetlengthanddata.xml +26/808 characterdatadeletedatamiddle.xml +27/808 characterdatadeletedatanomodificationallowederrEE.xml +28/808 characterdatagetdata.xml +29/808 characterdatagetlength.xml +30/808 characterdataindexsizeerrdeletedatacountnegative.xml implementationAttribute signed not supported, skipping test -31/525 characterdataindexsizeerrdeletedataoffsetgreater.xml -32/525 characterdataindexsizeerrdeletedataoffsetnegative.xml +31/808 characterdataindexsizeerrdeletedataoffsetgreater.xml +32/808 characterdataindexsizeerrdeletedataoffsetnegative.xml implementationAttribute signed not supported, skipping test -33/525 characterdataindexsizeerrinsertdataoffsetgreater.xml -34/525 characterdataindexsizeerrinsertdataoffsetnegative.xml +33/808 characterdataindexsizeerrinsertdataoffsetgreater.xml +34/808 characterdataindexsizeerrinsertdataoffsetnegative.xml implementationAttribute signed not supported, skipping test -35/525 characterdataindexsizeerrreplacedatacountnegative.xml +35/808 characterdataindexsizeerrreplacedatacountnegative.xml implementationAttribute signed not supported, skipping test -36/525 characterdataindexsizeerrreplacedataoffsetgreater.xml -37/525 characterdataindexsizeerrreplacedataoffsetnegative.xml +36/808 characterdataindexsizeerrreplacedataoffsetgreater.xml +37/808 characterdataindexsizeerrreplacedataoffsetnegative.xml implementationAttribute signed not supported, skipping test -38/525 characterdataindexsizeerrsubstringcountnegative.xml +38/808 characterdataindexsizeerrsubstringcountnegative.xml implementationAttribute signed not supported, skipping test -39/525 characterdataindexsizeerrsubstringnegativeoffset.xml +39/808 characterdataindexsizeerrsubstringnegativeoffset.xml implementationAttribute signed not supported, skipping test -40/525 characterdataindexsizeerrsubstringoffsetgreater.xml -41/525 characterdatainsertdatabeginning.xml -42/525 characterdatainsertdataend.xml -43/525 characterdatainsertdatamiddle.xml -44/525 characterdatainsertdatanomodificationallowederr.xml -45/525 characterdatainsertdatanomodificationallowederrEE.xml -46/525 characterdatareplacedatabegining.xml -47/525 characterdatareplacedataend.xml -48/525 characterdatareplacedataexceedslengthofarg.xml -49/525 characterdatareplacedataexceedslengthofdata.xml -50/525 characterdatareplacedatamiddle.xml -51/525 characterdatareplacedatanomodificationallowederr.xml -52/525 characterdatareplacedatanomodificationallowederrEE.xml -53/525 characterdatasetdatanomodificationallowederr.xml -54/525 characterdatasetdatanomodificationallowederrEE.xml -55/525 characterdatasetnodevalue.xml -56/525 characterdatasubstringexceedsvalue.xml -57/525 characterdatasubstringvalue.xml -58/525 commentgetcomment.xml -59/525 documentcreateattribute.xml -60/525 documentcreatecdatasection.xml -61/525 documentcreatecomment.xml -62/525 documentcreatedocumentfragment.xml -63/525 documentcreateelement.xml -64/525 documentcreateelementcasesensitive.xml -65/525 documentcreateelementdefaultattr.xml -66/525 documentcreateentityreference.xml -67/525 documentcreateentityreferenceknown.xml -68/525 documentcreateprocessinginstruction.xml -69/525 documentcreatetextnode.xml -70/525 documentgetdoctype.xml -71/525 documentgetdoctypenodtd.xml -72/525 documentgetelementsbytagnamelength.xml -73/525 documentgetelementsbytagnametotallength.xml -74/525 documentgetelementsbytagnamevalue.xml -75/525 documentgetimplementation.xml -76/525 documentgetrootnode.xml -77/525 documentinvalidcharacterexceptioncreateattribute.xml -78/525 documentinvalidcharacterexceptioncreateelement.xml -79/525 documentinvalidcharacterexceptioncreateentref.xml -80/525 documentinvalidcharacterexceptioncreateentref1.xml -81/525 documentinvalidcharacterexceptioncreatepi.xml -82/525 documentinvalidcharacterexceptioncreatepi1.xml -83/525 documenttypegetdoctype.xml -84/525 documenttypegetentities.xml -85/525 documenttypegetentitieslength.xml -86/525 documenttypegetentitiestype.xml -87/525 documenttypegetnotations.xml -88/525 documenttypegetnotationstype.xml -89/525 domimplementationfeaturenoversion.xml -90/525 domimplementationfeaturenull.xml +40/808 characterdataindexsizeerrsubstringoffsetgreater.xml +41/808 characterdatainsertdatabeginning.xml +42/808 characterdatainsertdataend.xml +43/808 characterdatainsertdatamiddle.xml +44/808 characterdatainsertdatanomodificationallowederr.xml +45/808 characterdatainsertdatanomodificationallowederrEE.xml +46/808 characterdatareplacedatabegining.xml +47/808 characterdatareplacedataend.xml +48/808 characterdatareplacedataexceedslengthofarg.xml +49/808 characterdatareplacedataexceedslengthofdata.xml +50/808 characterdatareplacedatamiddle.xml +51/808 characterdatareplacedatanomodificationallowederr.xml +52/808 characterdatareplacedatanomodificationallowederrEE.xml +53/808 characterdatasetdatanomodificationallowederr.xml +54/808 characterdatasetdatanomodificationallowederrEE.xml +55/808 characterdatasetnodevalue.xml +56/808 characterdatasubstringexceedsvalue.xml +57/808 characterdatasubstringvalue.xml +58/808 commentgetcomment.xml +59/808 documentcreateattribute.xml +60/808 documentcreatecdatasection.xml +61/808 documentcreatecomment.xml +62/808 documentcreatedocumentfragment.xml +63/808 documentcreateelement.xml +64/808 documentcreateelementcasesensitive.xml +65/808 documentcreateelementdefaultattr.xml +66/808 documentcreateentityreference.xml +67/808 documentcreateentityreferenceknown.xml +68/808 documentcreateprocessinginstruction.xml +69/808 documentcreatetextnode.xml +70/808 documentgetdoctype.xml +71/808 documentgetdoctypenodtd.xml +72/808 documentgetelementsbytagnamelength.xml +73/808 documentgetelementsbytagnametotallength.xml +74/808 documentgetelementsbytagnamevalue.xml +75/808 documentgetimplementation.xml +76/808 documentgetrootnode.xml +77/808 documentinvalidcharacterexceptioncreateattribute.xml +78/808 documentinvalidcharacterexceptioncreateelement.xml +79/808 documentinvalidcharacterexceptioncreateentref.xml +80/808 documentinvalidcharacterexceptioncreateentref1.xml +81/808 documentinvalidcharacterexceptioncreatepi.xml +82/808 documentinvalidcharacterexceptioncreatepi1.xml +83/808 documenttypegetdoctype.xml +84/808 documenttypegetentities.xml +85/808 documenttypegetentitieslength.xml +86/808 documenttypegetentitiestype.xml +87/808 documenttypegetnotations.xml +88/808 documenttypegetnotationstype.xml +89/808 domimplementationfeaturenoversion.xml +90/808 domimplementationfeaturenull.xml implementationAttribute hasNullString not supported, skipping test -91/525 domimplementationfeaturexml.xml -92/525 elementaddnewattribute.xml -93/525 elementassociatedattribute.xml -94/525 elementchangeattributevalue.xml -95/525 elementcreatenewattribute.xml -96/525 elementgetattributenode.xml -97/525 elementgetattributenodenull.xml -98/525 elementgetelementempty.xml -99/525 elementgetelementsbytagname.xml -100/525 elementgetelementsbytagnameaccessnodelist.xml -101/525 elementgetelementsbytagnamenomatch.xml -102/525 elementgetelementsbytagnamespecialvalue.xml -103/525 elementgettagname.xml -104/525 elementinuseattributeerr.xml -105/525 elementinvalidcharacterexception.xml -106/525 elementnormalize.xml -107/525 elementnotfounderr.xml -108/525 elementremoveattribute.xml -109/525 elementremoveattributeaftercreate.xml -110/525 elementremoveattributenode.xml -111/525 elementremoveattributenodenomodificationallowederr.xml -112/525 elementremoveattributenodenomodificationallowederrEE.xml -113/525 elementremoveattributenomodificationallowederr.xml -114/525 elementremoveattributenomodificationallowederrEE.xml -115/525 elementremoveattributerestoredefaultvalue.xml -116/525 elementreplaceattributewithself.xml -117/525 elementreplaceexistingattribute.xml -118/525 elementreplaceexistingattributegevalue.xml -119/525 elementretrieveallattributes.xml -120/525 elementretrieveattrvalue.xml -121/525 elementretrievetagname.xml -122/525 elementsetattributenodenomodificationallowederr.xml -123/525 elementsetattributenodenomodificationallowederrEE.xml +91/808 domimplementationfeaturexml.xml +92/808 elementaddnewattribute.xml +93/808 elementassociatedattribute.xml +94/808 elementchangeattributevalue.xml +95/808 elementcreatenewattribute.xml +96/808 elementgetattributenode.xml +97/808 elementgetattributenodenull.xml +98/808 elementgetelementempty.xml +99/808 elementgetelementsbytagname.xml +100/808 elementgetelementsbytagnameaccessnodelist.xml +101/808 elementgetelementsbytagnamenomatch.xml +102/808 elementgetelementsbytagnamespecialvalue.xml +103/808 elementgettagname.xml +104/808 elementinuseattributeerr.xml +105/808 elementinvalidcharacterexception.xml +106/808 elementnormalize.xml +107/808 elementnotfounderr.xml +108/808 elementremoveattribute.xml +109/808 elementremoveattributeaftercreate.xml +110/808 elementremoveattributenode.xml +111/808 elementremoveattributenodenomodificationallowederr.xml +112/808 elementremoveattributenodenomodificationallowederrEE.xml +113/808 elementremoveattributenomodificationallowederr.xml +114/808 elementremoveattributenomodificationallowederrEE.xml +115/808 elementremoveattributerestoredefaultvalue.xml +116/808 elementreplaceattributewithself.xml +117/808 elementreplaceexistingattribute.xml +118/808 elementreplaceexistingattributegevalue.xml +119/808 elementretrieveallattributes.xml +120/808 elementretrieveattrvalue.xml +121/808 elementretrievetagname.xml +122/808 elementsetattributenodenomodificationallowederr.xml +123/808 elementsetattributenodenomodificationallowederrEE.xml implementationAttribute expandEntityReferences not supported, skipping test -124/525 elementsetattributenodenull.xml -125/525 elementsetattributenomodificationallowederr.xml +124/808 elementsetattributenodenull.xml +125/808 elementsetattributenomodificationallowederr.xml implementationAttribute expandEntityReferences not supported, skipping test -126/525 elementsetattributenomodificationallowederrEE.xml -127/525 elementwrongdocumenterr.xml -128/525 entitygetentityname.xml -129/525 entitygetpublicid.xml -130/525 entitygetpublicidnull.xml -131/525 namednodemapchildnoderange.xml -132/525 namednodemapgetnameditem.xml -133/525 namednodemapinuseattributeerr.xml -134/525 namednodemapnotfounderr.xml -135/525 namednodemapnumberofnodes.xml -136/525 namednodemapremovenameditem.xml -137/525 namednodemapremovenameditemgetvalue.xml -138/525 namednodemapremovenameditemreturnnodevalue.xml -139/525 namednodemapreturnattrnode.xml -140/525 namednodemapreturnfirstitem.xml -141/525 namednodemapreturnlastitem.xml -142/525 namednodemapreturnnull.xml -143/525 namednodemapsetnameditem.xml -144/525 namednodemapsetnameditemreturnvalue.xml -145/525 namednodemapsetnameditemthatexists.xml -146/525 namednodemapsetnameditemwithnewvalue.xml -147/525 namednodemapwrongdocumenterr.xml -148/525 nodeappendchild.xml -149/525 nodeappendchildchildexists.xml -150/525 nodeappendchilddocfragment.xml -151/525 nodeappendchildgetnodename.xml -152/525 nodeappendchildinvalidnodetype.xml -153/525 nodeappendchildnewchilddiffdocument.xml -154/525 nodeappendchildnodeancestor.xml -155/525 nodeappendchildnomodificationallowederr.xml -156/525 nodeappendchildnomodificationallowederrEE.xml -157/525 nodeattributenodeattribute.xml -158/525 nodeattributenodename.xml -159/525 nodeattributenodetype.xml -160/525 nodeattributenodevalue.xml -161/525 nodecdatasectionnodeattribute.xml -162/525 nodecdatasectionnodename.xml -163/525 nodecdatasectionnodetype.xml +126/808 elementsetattributenomodificationallowederrEE.xml +127/808 elementwrongdocumenterr.xml +128/808 entitygetentityname.xml +129/808 entitygetpublicid.xml +130/808 entitygetpublicidnull.xml +131/808 namednodemapchildnoderange.xml +132/808 namednodemapgetnameditem.xml +133/808 namednodemapinuseattributeerr.xml +134/808 namednodemapnotfounderr.xml +135/808 namednodemapnumberofnodes.xml +136/808 namednodemapremovenameditem.xml +137/808 namednodemapremovenameditemgetvalue.xml +138/808 namednodemapremovenameditemreturnnodevalue.xml +139/808 namednodemapreturnattrnode.xml +140/808 namednodemapreturnfirstitem.xml +141/808 namednodemapreturnlastitem.xml +142/808 namednodemapreturnnull.xml +143/808 namednodemapsetnameditem.xml +144/808 namednodemapsetnameditemreturnvalue.xml +145/808 namednodemapsetnameditemthatexists.xml +146/808 namednodemapsetnameditemwithnewvalue.xml +147/808 namednodemapwrongdocumenterr.xml +148/808 nodeappendchild.xml +149/808 nodeappendchildchildexists.xml +150/808 nodeappendchilddocfragment.xml +151/808 nodeappendchildgetnodename.xml +152/808 nodeappendchildinvalidnodetype.xml +153/808 nodeappendchildnewchilddiffdocument.xml +154/808 nodeappendchildnodeancestor.xml +155/808 nodeappendchildnomodificationallowederr.xml +156/808 nodeappendchildnomodificationallowederrEE.xml +157/808 nodeattributenodeattribute.xml +158/808 nodeattributenodename.xml +159/808 nodeattributenodetype.xml +160/808 nodeattributenodevalue.xml +161/808 nodecdatasectionnodeattribute.xml +162/808 nodecdatasectionnodename.xml +163/808 nodecdatasectionnodetype.xml implementationAttribute coalescing not supported, skipping test -164/525 nodecdatasectionnodevalue.xml +164/808 nodecdatasectionnodevalue.xml implementationAttribute coalescing not supported, skipping test -165/525 nodechildnodes.xml -166/525 nodechildnodesappendchild.xml -167/525 nodechildnodesempty.xml -168/525 nodecloneattributescopied.xml -169/525 nodeclonefalsenocopytext.xml -170/525 nodeclonegetparentnull.xml -171/525 nodeclonenodefalse.xml -172/525 nodeclonenodetrue.xml -173/525 nodeclonetruecopytext.xml -174/525 nodecommentnodeattributes.xml -175/525 nodecommentnodename.xml -176/525 nodecommentnodetype.xml -177/525 nodecommentnodevalue.xml -178/525 nodedocumentfragmentnodename.xml -179/525 nodedocumentfragmentnodetype.xml -180/525 nodedocumentfragmentnodevalue.xml -181/525 nodedocumentnodeattribute.xml -182/525 nodedocumentnodename.xml -183/525 nodedocumentnodetype.xml -184/525 nodedocumentnodevalue.xml -185/525 nodedocumenttypenodename.xml -186/525 nodedocumenttypenodetype.xml -187/525 nodedocumenttypenodevalue.xml -188/525 nodeelementnodeattributes.xml -189/525 nodeelementnodename.xml -190/525 nodeelementnodetype.xml -191/525 nodeelementnodevalue.xml -192/525 nodeentitynodeattributes.xml -193/525 nodeentitynodename.xml -194/525 nodeentitynodetype.xml -195/525 nodeentitynodevalue.xml -196/525 nodeentitysetnodevalue.xml -197/525 nodeentityreferencenodeattributes.xml -198/525 nodeentityreferencenodename.xml -199/525 nodeentityreferencenodetype.xml -200/525 nodeentityreferencenodevalue.xml -201/525 nodegetfirstchild.xml -202/525 nodegetfirstchildnull.xml -203/525 nodegetlastchild.xml -204/525 nodegetlastchildnull.xml -205/525 nodegetnextsibling.xml -206/525 nodegetnextsiblingnull.xml -207/525 nodegetownerdocument.xml -208/525 nodegetownerdocumentnull.xml -209/525 nodegetprevioussibling.xml -210/525 nodegetprevioussiblingnull.xml -211/525 nodehaschildnodes.xml -212/525 nodehaschildnodesfalse.xml -213/525 nodeinsertbefore.xml -214/525 nodeinsertbeforedocfragment.xml -215/525 nodeinsertbeforeinvalidnodetype.xml -216/525 nodeinsertbeforenewchilddiffdocument.xml -217/525 nodeinsertbeforenewchildexists.xml -218/525 nodeinsertbeforenodeancestor.xml -219/525 nodeinsertbeforenodename.xml -220/525 nodeinsertbeforenomodificationallowederr.xml -221/525 nodeinsertbeforenomodificationallowederrEE.xml -222/525 nodeinsertbeforerefchildnonexistent.xml -223/525 nodeinsertbeforerefchildnull.xml -224/525 nodelistindexequalzero.xml -225/525 nodelistindexgetlength.xml -226/525 nodelistindexgetlengthofemptylist.xml -227/525 nodelistindexnotzero.xml -228/525 nodelistreturnfirstitem.xml -229/525 nodelistreturnlastitem.xml -230/525 nodelisttraverselist.xml -231/525 nodenotationnodeattributes.xml -232/525 nodenotationnodename.xml -233/525 nodenotationnodetype.xml -234/525 nodenotationnodevalue.xml -235/525 nodeparentnode.xml -236/525 nodeparentnodenull.xml -237/525 nodeprocessinginstructionnodeattributes.xml -238/525 nodeprocessinginstructionnodename.xml -239/525 nodeprocessinginstructionnodetype.xml -240/525 nodeprocessinginstructionnodevalue.xml -241/525 nodeprocessinginstructionsetnodevalue.xml -242/525 noderemovechild.xml -243/525 noderemovechildgetnodename.xml -244/525 noderemovechildnode.xml -245/525 noderemovechildnomodificationallowederr.xml -246/525 noderemovechildnomodificationallowederrEE.xml -247/525 noderemovechildoldchildnonexistent.xml -248/525 nodereplacechild.xml -249/525 nodereplacechildinvalidnodetype.xml -250/525 nodereplacechildnewchilddiffdocument.xml -251/525 nodereplacechildnewchildexists.xml -252/525 nodereplacechildnodeancestor.xml -253/525 nodereplacechildnodename.xml -254/525 nodereplacechildnomodificationallowederr.xml -255/525 nodereplacechildnomodificationallowederrEE.xml -256/525 nodereplacechildoldchildnonexistent.xml -257/525 nodesetnodevaluenomodificationallowederr.xml -258/525 nodesetnodevaluenomodificationallowederrEE.xml -259/525 nodetextnodeattribute.xml -260/525 nodetextnodename.xml -261/525 nodetextnodetype.xml -262/525 nodetextnodevalue.xml -263/525 notationgetnotationname.xml -264/525 notationgetpublicid.xml -265/525 notationgetpublicidnull.xml -266/525 notationgetsystemid.xml -267/525 notationgetsystemidnull.xml -268/525 processinginstructiongetdata.xml -269/525 processinginstructiongettarget.xml -270/525 processinginstructionsetdatanomodificationallowederr.xml +165/808 nodechildnodes.xml +166/808 nodechildnodesappendchild.xml +167/808 nodechildnodesempty.xml +168/808 nodecloneattributescopied.xml +169/808 nodeclonefalsenocopytext.xml +170/808 nodeclonegetparentnull.xml +171/808 nodeclonenodefalse.xml +172/808 nodeclonenodetrue.xml +173/808 nodeclonetruecopytext.xml +174/808 nodecommentnodeattributes.xml +175/808 nodecommentnodename.xml +176/808 nodecommentnodetype.xml +177/808 nodecommentnodevalue.xml +178/808 nodedocumentfragmentnodename.xml +179/808 nodedocumentfragmentnodetype.xml +180/808 nodedocumentfragmentnodevalue.xml +181/808 nodedocumentnodeattribute.xml +182/808 nodedocumentnodename.xml +183/808 nodedocumentnodetype.xml +184/808 nodedocumentnodevalue.xml +185/808 nodedocumenttypenodename.xml +186/808 nodedocumenttypenodetype.xml +187/808 nodedocumenttypenodevalue.xml +188/808 nodeelementnodeattributes.xml +189/808 nodeelementnodename.xml +190/808 nodeelementnodetype.xml +191/808 nodeelementnodevalue.xml +192/808 nodeentitynodeattributes.xml +193/808 nodeentitynodename.xml +194/808 nodeentitynodetype.xml +195/808 nodeentitynodevalue.xml +196/808 nodeentitysetnodevalue.xml +197/808 nodeentityreferencenodeattributes.xml +198/808 nodeentityreferencenodename.xml +199/808 nodeentityreferencenodetype.xml +200/808 nodeentityreferencenodevalue.xml +201/808 nodegetfirstchild.xml +202/808 nodegetfirstchildnull.xml +203/808 nodegetlastchild.xml +204/808 nodegetlastchildnull.xml +205/808 nodegetnextsibling.xml +206/808 nodegetnextsiblingnull.xml +207/808 nodegetownerdocument.xml +208/808 nodegetownerdocumentnull.xml +209/808 nodegetprevioussibling.xml +210/808 nodegetprevioussiblingnull.xml +211/808 nodehaschildnodes.xml +212/808 nodehaschildnodesfalse.xml +213/808 nodeinsertbefore.xml +214/808 nodeinsertbeforedocfragment.xml +215/808 nodeinsertbeforeinvalidnodetype.xml +216/808 nodeinsertbeforenewchilddiffdocument.xml +217/808 nodeinsertbeforenewchildexists.xml +218/808 nodeinsertbeforenodeancestor.xml +219/808 nodeinsertbeforenodename.xml +220/808 nodeinsertbeforenomodificationallowederr.xml +221/808 nodeinsertbeforenomodificationallowederrEE.xml +222/808 nodeinsertbeforerefchildnonexistent.xml +223/808 nodeinsertbeforerefchildnull.xml +224/808 nodelistindexequalzero.xml +225/808 nodelistindexgetlength.xml +226/808 nodelistindexgetlengthofemptylist.xml +227/808 nodelistindexnotzero.xml +228/808 nodelistreturnfirstitem.xml +229/808 nodelistreturnlastitem.xml +230/808 nodelisttraverselist.xml +231/808 nodenotationnodeattributes.xml +232/808 nodenotationnodename.xml +233/808 nodenotationnodetype.xml +234/808 nodenotationnodevalue.xml +235/808 nodeparentnode.xml +236/808 nodeparentnodenull.xml +237/808 nodeprocessinginstructionnodeattributes.xml +238/808 nodeprocessinginstructionnodename.xml +239/808 nodeprocessinginstructionnodetype.xml +240/808 nodeprocessinginstructionnodevalue.xml +241/808 nodeprocessinginstructionsetnodevalue.xml +242/808 noderemovechild.xml +243/808 noderemovechildgetnodename.xml +244/808 noderemovechildnode.xml +245/808 noderemovechildnomodificationallowederr.xml +246/808 noderemovechildnomodificationallowederrEE.xml +247/808 noderemovechildoldchildnonexistent.xml +248/808 nodereplacechild.xml +249/808 nodereplacechildinvalidnodetype.xml +250/808 nodereplacechildnewchilddiffdocument.xml +251/808 nodereplacechildnewchildexists.xml +252/808 nodereplacechildnodeancestor.xml +253/808 nodereplacechildnodename.xml +254/808 nodereplacechildnomodificationallowederr.xml +255/808 nodereplacechildnomodificationallowederrEE.xml +256/808 nodereplacechildoldchildnonexistent.xml +257/808 nodesetnodevaluenomodificationallowederr.xml +258/808 nodesetnodevaluenomodificationallowederrEE.xml +259/808 nodetextnodeattribute.xml +260/808 nodetextnodename.xml +261/808 nodetextnodetype.xml +262/808 nodetextnodevalue.xml +263/808 notationgetnotationname.xml +264/808 notationgetpublicid.xml +265/808 notationgetpublicidnull.xml +266/808 notationgetsystemid.xml +267/808 notationgetsystemidnull.xml +268/808 processinginstructiongetdata.xml +269/808 processinginstructiongettarget.xml +270/808 processinginstructionsetdatanomodificationallowederr.xml implementationAttribute expandEntityReferences not supported, skipping test -271/525 processinginstructionsetdatanomodificationallowederrEE.xml -272/525 textindexsizeerrnegativeoffset.xml +271/808 processinginstructionsetdatanomodificationallowederrEE.xml +272/808 textindexsizeerrnegativeoffset.xml implementationAttribute signed not supported, skipping test -273/525 textindexsizeerroffsetoutofbounds.xml -274/525 textparseintolistofelements.xml -275/525 textsplittextfour.xml -276/525 textsplittextnomodificationallowederr.xml -277/525 textsplittextnomodificationallowederrEE.xml -278/525 textsplittextone.xml -279/525 textsplittextthree.xml -280/525 textsplittexttwo.xml -281/525 textwithnomarkup.xml -282/525 nodevalue01.xml -283/525 nodevalue02.xml -284/525 nodevalue03.xml -285/525 nodevalue04.xml -286/525 nodevalue05.xml -287/525 nodevalue06.xml -288/525 nodevalue07.xml -289/525 nodevalue08.xml -290/525 nodevalue09.xml -291/525 hc_attrcreatedocumentfragment.xml -292/525 hc_attrcreatetextnode.xml -293/525 hc_attrcreatetextnode2.xml -294/525 hc_attreffectivevalue.xml -295/525 hc_attrname.xml -296/525 hc_attrnextsiblingnull.xml -297/525 hc_attrparentnodenull.xml -298/525 hc_attrprevioussiblingnull.xml -299/525 hc_attrspecifiedvalue.xml -300/525 hc_attrspecifiedvaluechanged.xml -301/525 hc_characterdataappenddata.xml -302/525 hc_characterdataappenddatagetdata.xml -303/525 hc_characterdatadeletedatabegining.xml -304/525 hc_characterdatadeletedataend.xml -305/525 hc_characterdatadeletedataexceedslength.xml -306/525 hc_characterdatadeletedatagetlengthanddata.xml -307/525 hc_characterdatadeletedatamiddle.xml -308/525 hc_characterdatagetdata.xml -309/525 hc_characterdatagetlength.xml -310/525 hc_characterdataindexsizeerrdeletedatacountnegative.xml +273/808 textindexsizeerroffsetoutofbounds.xml +274/808 textparseintolistofelements.xml +275/808 textsplittextfour.xml +276/808 textsplittextnomodificationallowederr.xml +277/808 textsplittextnomodificationallowederrEE.xml +278/808 textsplittextone.xml +279/808 textsplittextthree.xml +280/808 textsplittexttwo.xml +281/808 textwithnomarkup.xml +282/808 nodevalue01.xml +283/808 nodevalue02.xml +284/808 nodevalue03.xml +285/808 nodevalue04.xml +286/808 nodevalue05.xml +287/808 nodevalue06.xml +288/808 nodevalue07.xml +289/808 nodevalue08.xml +290/808 nodevalue09.xml +291/808 hc_attrcreatedocumentfragment.xml +292/808 hc_attrcreatetextnode.xml +293/808 hc_attrcreatetextnode2.xml +294/808 hc_attreffectivevalue.xml +295/808 hc_attrname.xml +296/808 hc_attrnextsiblingnull.xml +297/808 hc_attrparentnodenull.xml +298/808 hc_attrprevioussiblingnull.xml +299/808 hc_attrspecifiedvalue.xml +300/808 hc_attrspecifiedvaluechanged.xml +301/808 hc_characterdataappenddata.xml +302/808 hc_characterdataappenddatagetdata.xml +303/808 hc_characterdatadeletedatabegining.xml +304/808 hc_characterdatadeletedataend.xml +305/808 hc_characterdatadeletedataexceedslength.xml +306/808 hc_characterdatadeletedatagetlengthanddata.xml +307/808 hc_characterdatadeletedatamiddle.xml +308/808 hc_characterdatagetdata.xml +309/808 hc_characterdatagetlength.xml +310/808 hc_characterdataindexsizeerrdeletedatacountnegative.xml implementationAttribute signed not supported, skipping test -311/525 hc_characterdataindexsizeerrdeletedataoffsetgreater.xml -312/525 hc_characterdataindexsizeerrdeletedataoffsetnegative.xml +311/808 hc_characterdataindexsizeerrdeletedataoffsetgreater.xml +312/808 hc_characterdataindexsizeerrdeletedataoffsetnegative.xml implementationAttribute signed not supported, skipping test -313/525 hc_characterdataindexsizeerrinsertdataoffsetgreater.xml -314/525 hc_characterdataindexsizeerrinsertdataoffsetnegative.xml +313/808 hc_characterdataindexsizeerrinsertdataoffsetgreater.xml +314/808 hc_characterdataindexsizeerrinsertdataoffsetnegative.xml implementationAttribute signed not supported, skipping test -315/525 hc_characterdataindexsizeerrreplacedatacountnegative.xml +315/808 hc_characterdataindexsizeerrreplacedatacountnegative.xml implementationAttribute signed not supported, skipping test -316/525 hc_characterdataindexsizeerrreplacedataoffsetgreater.xml -317/525 hc_characterdataindexsizeerrreplacedataoffsetnegative.xml +316/808 hc_characterdataindexsizeerrreplacedataoffsetgreater.xml +317/808 hc_characterdataindexsizeerrreplacedataoffsetnegative.xml implementationAttribute signed not supported, skipping test -318/525 hc_characterdataindexsizeerrsubstringcountnegative.xml +318/808 hc_characterdataindexsizeerrsubstringcountnegative.xml implementationAttribute signed not supported, skipping test -319/525 hc_characterdataindexsizeerrsubstringnegativeoffset.xml +319/808 hc_characterdataindexsizeerrsubstringnegativeoffset.xml implementationAttribute signed not supported, skipping test -320/525 hc_characterdataindexsizeerrsubstringoffsetgreater.xml -321/525 hc_characterdatainsertdatabeginning.xml -322/525 hc_characterdatainsertdataend.xml -323/525 hc_characterdatainsertdatamiddle.xml -324/525 hc_characterdatareplacedatabegining.xml -325/525 hc_characterdatareplacedataend.xml -326/525 hc_characterdatareplacedataexceedslengthofarg.xml -327/525 hc_characterdatareplacedataexceedslengthofdata.xml -328/525 hc_characterdatareplacedatamiddle.xml -329/525 hc_characterdatasetnodevalue.xml -330/525 hc_characterdatasubstringexceedsvalue.xml -331/525 hc_characterdatasubstringvalue.xml -332/525 hc_commentgetcomment.xml -333/525 hc_documentcreateattribute.xml -334/525 hc_documentcreatecomment.xml -335/525 hc_documentcreatedocumentfragment.xml -336/525 hc_documentcreateelement.xml -337/525 hc_documentcreateelementcasesensitive.xml -338/525 hc_documentcreatetextnode.xml -339/525 hc_documentgetdoctype.xml -340/525 hc_documentgetelementsbytagnamelength.xml -341/525 hc_documentgetelementsbytagnametotallength.xml -342/525 hc_documentgetelementsbytagnamevalue.xml -343/525 hc_documentgetimplementation.xml -344/525 hc_documentgetrootnode.xml -345/525 hc_documentinvalidcharacterexceptioncreateattribute.xml -346/525 hc_documentinvalidcharacterexceptioncreateattribute1.xml -347/525 hc_documentinvalidcharacterexceptioncreateelement.xml -348/525 hc_documentinvalidcharacterexceptioncreateelement1.xml -349/525 hc_domimplementationfeaturenoversion.xml -350/525 hc_domimplementationfeaturenull.xml +320/808 hc_characterdataindexsizeerrsubstringoffsetgreater.xml +321/808 hc_characterdatainsertdatabeginning.xml +322/808 hc_characterdatainsertdataend.xml +323/808 hc_characterdatainsertdatamiddle.xml +324/808 hc_characterdatareplacedatabegining.xml +325/808 hc_characterdatareplacedataend.xml +326/808 hc_characterdatareplacedataexceedslengthofarg.xml +327/808 hc_characterdatareplacedataexceedslengthofdata.xml +328/808 hc_characterdatareplacedatamiddle.xml +329/808 hc_characterdatasetnodevalue.xml +330/808 hc_characterdatasubstringexceedsvalue.xml +331/808 hc_characterdatasubstringvalue.xml +332/808 hc_commentgetcomment.xml +333/808 hc_documentcreateattribute.xml +334/808 hc_documentcreatecomment.xml +335/808 hc_documentcreatedocumentfragment.xml +336/808 hc_documentcreateelement.xml +337/808 hc_documentcreateelementcasesensitive.xml +338/808 hc_documentcreatetextnode.xml +339/808 hc_documentgetdoctype.xml +340/808 hc_documentgetelementsbytagnamelength.xml +341/808 hc_documentgetelementsbytagnametotallength.xml +342/808 hc_documentgetelementsbytagnamevalue.xml +343/808 hc_documentgetimplementation.xml +344/808 hc_documentgetrootnode.xml +345/808 hc_documentinvalidcharacterexceptioncreateattribute.xml +346/808 hc_documentinvalidcharacterexceptioncreateattribute1.xml +347/808 hc_documentinvalidcharacterexceptioncreateelement.xml +348/808 hc_documentinvalidcharacterexceptioncreateelement1.xml +349/808 hc_domimplementationfeaturenoversion.xml +350/808 hc_domimplementationfeaturenull.xml implementationAttribute hasNullString not supported, skipping test -351/525 hc_domimplementationfeaturexml.xml -352/525 hc_elementaddnewattribute.xml -353/525 hc_elementassociatedattribute.xml -354/525 hc_elementchangeattributevalue.xml -355/525 hc_elementcreatenewattribute.xml -356/525 hc_elementgetattributenode.xml -357/525 hc_elementgetattributenodenull.xml -358/525 hc_elementgetelementempty.xml -359/525 hc_elementgetelementsbytagname.xml -360/525 hc_elementgetelementsbytagnameaccessnodelist.xml -361/525 hc_elementgetelementsbytagnamenomatch.xml -362/525 hc_elementgetelementsbytagnamespecialvalue.xml -363/525 hc_elementgettagname.xml -364/525 hc_elementinuseattributeerr.xml -365/525 hc_elementinvalidcharacterexception.xml -366/525 hc_elementinvalidcharacterexception1.xml -367/525 hc_elementnormalize.xml -368/525 hc_elementnotfounderr.xml -369/525 hc_elementremoveattribute.xml -370/525 hc_elementremoveattributeaftercreate.xml -371/525 hc_elementremoveattributenode.xml -372/525 hc_elementreplaceattributewithself.xml -373/525 hc_elementreplaceexistingattribute.xml -374/525 hc_elementreplaceexistingattributegevalue.xml -375/525 hc_elementretrieveallattributes.xml -376/525 hc_elementretrieveattrvalue.xml -377/525 hc_elementretrievetagname.xml -378/525 hc_elementsetattributenodenull.xml -379/525 hc_elementwrongdocumenterr.xml -380/525 hc_entitiesremovenameditem1.xml -381/525 hc_entitiessetnameditem1.xml -382/525 hc_namednodemapchildnoderange.xml -383/525 hc_namednodemapgetnameditem.xml -384/525 hc_namednodemapinuseattributeerr.xml -385/525 hc_namednodemapnotfounderr.xml -386/525 hc_namednodemapnumberofnodes.xml -387/525 hc_namednodemapremovenameditem.xml -388/525 hc_namednodemapreturnattrnode.xml -389/525 hc_namednodemapreturnfirstitem.xml -390/525 hc_namednodemapreturnlastitem.xml -391/525 hc_namednodemapreturnnull.xml -392/525 hc_namednodemapsetnameditem.xml -393/525 hc_namednodemapsetnameditemreturnvalue.xml -394/525 hc_namednodemapsetnameditemthatexists.xml -395/525 hc_namednodemapsetnameditemwithnewvalue.xml -396/525 hc_namednodemapwrongdocumenterr.xml -397/525 hc_nodeappendchild.xml -398/525 hc_nodeappendchildchildexists.xml -399/525 hc_nodeappendchilddocfragment.xml -400/525 hc_nodeappendchildgetnodename.xml -401/525 hc_nodeappendchildinvalidnodetype.xml -402/525 hc_nodeappendchildnewchilddiffdocument.xml -403/525 hc_nodeappendchildnodeancestor.xml -404/525 hc_nodeattributenodeattribute.xml -405/525 hc_nodeattributenodename.xml -406/525 hc_nodeattributenodetype.xml -407/525 hc_nodeattributenodevalue.xml -408/525 hc_nodechildnodes.xml -409/525 hc_nodechildnodesappendchild.xml -410/525 hc_nodechildnodesempty.xml -411/525 hc_nodecloneattributescopied.xml -412/525 hc_nodeclonefalsenocopytext.xml -413/525 hc_nodeclonegetparentnull.xml -414/525 hc_nodeclonenodefalse.xml -415/525 hc_nodeclonenodetrue.xml -416/525 hc_nodeclonetruecopytext.xml -417/525 hc_nodecommentnodeattributes.xml -418/525 hc_nodecommentnodename.xml -419/525 hc_nodecommentnodetype.xml -420/525 hc_nodecommentnodevalue.xml -421/525 hc_nodedocumentfragmentnodename.xml -422/525 hc_nodedocumentfragmentnodetype.xml -423/525 hc_nodedocumentfragmentnodevalue.xml -424/525 hc_nodedocumentnodeattribute.xml -425/525 hc_nodedocumentnodename.xml -426/525 hc_nodedocumentnodetype.xml -427/525 hc_nodedocumentnodevalue.xml -428/525 hc_nodeelementnodeattributes.xml -429/525 hc_nodeelementnodename.xml -430/525 hc_nodeelementnodetype.xml -431/525 hc_nodeelementnodevalue.xml -432/525 hc_nodegetfirstchild.xml -433/525 hc_nodegetfirstchildnull.xml -434/525 hc_nodegetlastchild.xml -435/525 hc_nodegetlastchildnull.xml -436/525 hc_nodegetnextsibling.xml -437/525 hc_nodegetnextsiblingnull.xml -438/525 hc_nodegetownerdocument.xml -439/525 hc_nodegetownerdocumentnull.xml -440/525 hc_nodegetprevioussibling.xml -441/525 hc_nodegetprevioussiblingnull.xml -442/525 hc_nodehaschildnodes.xml -443/525 hc_nodehaschildnodesfalse.xml -444/525 hc_nodeinsertbefore.xml -445/525 hc_nodeinsertbeforedocfragment.xml -446/525 hc_nodeinsertbeforeinvalidnodetype.xml -447/525 hc_nodeinsertbeforenewchilddiffdocument.xml -448/525 hc_nodeinsertbeforenewchildexists.xml -449/525 hc_nodeinsertbeforenodeancestor.xml -450/525 hc_nodeinsertbeforenodename.xml -451/525 hc_nodeinsertbeforerefchildnonexistent.xml -452/525 hc_nodeinsertbeforerefchildnull.xml -453/525 hc_nodelistindexequalzero.xml -454/525 hc_nodelistindexgetlength.xml -455/525 hc_nodelistindexgetlengthofemptylist.xml -456/525 hc_nodelistindexnotzero.xml -457/525 hc_nodelistreturnfirstitem.xml -458/525 hc_nodelistreturnlastitem.xml -459/525 hc_nodelisttraverselist.xml -460/525 hc_nodeparentnode.xml -461/525 hc_nodeparentnodenull.xml -462/525 hc_noderemovechild.xml -463/525 hc_noderemovechildgetnodename.xml -464/525 hc_noderemovechildnode.xml -465/525 hc_noderemovechildoldchildnonexistent.xml -466/525 hc_nodereplacechild.xml -467/525 hc_nodereplacechildinvalidnodetype.xml -468/525 hc_nodereplacechildnewchilddiffdocument.xml -469/525 hc_nodereplacechildnodeancestor.xml -470/525 hc_nodereplacechildnodename.xml -471/525 hc_nodereplacechildoldchildnonexistent.xml -472/525 hc_nodetextnodeattribute.xml -473/525 hc_nodetextnodename.xml -474/525 hc_nodetextnodetype.xml -475/525 hc_nodetextnodevalue.xml -476/525 hc_nodevalue01.xml -477/525 hc_nodevalue02.xml -478/525 hc_nodevalue03.xml -479/525 hc_nodevalue04.xml -480/525 hc_nodevalue05.xml -481/525 hc_nodevalue06.xml -482/525 hc_nodevalue07.xml -483/525 hc_nodevalue08.xml -484/525 hc_notationsremovenameditem1.xml -485/525 hc_notationssetnameditem1.xml -486/525 hc_textindexsizeerrnegativeoffset.xml +351/808 hc_domimplementationfeaturexml.xml +352/808 hc_elementaddnewattribute.xml +353/808 hc_elementassociatedattribute.xml +354/808 hc_elementchangeattributevalue.xml +355/808 hc_elementcreatenewattribute.xml +356/808 hc_elementgetattributenode.xml +357/808 hc_elementgetattributenodenull.xml +358/808 hc_elementgetelementempty.xml +359/808 hc_elementgetelementsbytagname.xml +360/808 hc_elementgetelementsbytagnameaccessnodelist.xml +361/808 hc_elementgetelementsbytagnamenomatch.xml +362/808 hc_elementgetelementsbytagnamespecialvalue.xml +363/808 hc_elementgettagname.xml +364/808 hc_elementinuseattributeerr.xml +365/808 hc_elementinvalidcharacterexception.xml +366/808 hc_elementinvalidcharacterexception1.xml +367/808 hc_elementnormalize.xml +368/808 hc_elementnotfounderr.xml +369/808 hc_elementremoveattribute.xml +370/808 hc_elementremoveattributeaftercreate.xml +371/808 hc_elementremoveattributenode.xml +372/808 hc_elementreplaceattributewithself.xml +373/808 hc_elementreplaceexistingattribute.xml +374/808 hc_elementreplaceexistingattributegevalue.xml +375/808 hc_elementretrieveallattributes.xml +376/808 hc_elementretrieveattrvalue.xml +377/808 hc_elementretrievetagname.xml +378/808 hc_elementsetattributenodenull.xml +379/808 hc_elementwrongdocumenterr.xml +380/808 hc_entitiesremovenameditem1.xml +381/808 hc_entitiessetnameditem1.xml +382/808 hc_namednodemapchildnoderange.xml +383/808 hc_namednodemapgetnameditem.xml +384/808 hc_namednodemapinuseattributeerr.xml +385/808 hc_namednodemapnotfounderr.xml +386/808 hc_namednodemapnumberofnodes.xml +387/808 hc_namednodemapremovenameditem.xml +388/808 hc_namednodemapreturnattrnode.xml +389/808 hc_namednodemapreturnfirstitem.xml +390/808 hc_namednodemapreturnlastitem.xml +391/808 hc_namednodemapreturnnull.xml +392/808 hc_namednodemapsetnameditem.xml +393/808 hc_namednodemapsetnameditemreturnvalue.xml +394/808 hc_namednodemapsetnameditemthatexists.xml +395/808 hc_namednodemapsetnameditemwithnewvalue.xml +396/808 hc_namednodemapwrongdocumenterr.xml +397/808 hc_nodeappendchild.xml +398/808 hc_nodeappendchildchildexists.xml +399/808 hc_nodeappendchilddocfragment.xml +400/808 hc_nodeappendchildgetnodename.xml +401/808 hc_nodeappendchildinvalidnodetype.xml +402/808 hc_nodeappendchildnewchilddiffdocument.xml +403/808 hc_nodeappendchildnodeancestor.xml +404/808 hc_nodeattributenodeattribute.xml +405/808 hc_nodeattributenodename.xml +406/808 hc_nodeattributenodetype.xml +407/808 hc_nodeattributenodevalue.xml +408/808 hc_nodechildnodes.xml +409/808 hc_nodechildnodesappendchild.xml +410/808 hc_nodechildnodesempty.xml +411/808 hc_nodecloneattributescopied.xml +412/808 hc_nodeclonefalsenocopytext.xml +413/808 hc_nodeclonegetparentnull.xml +414/808 hc_nodeclonenodefalse.xml +415/808 hc_nodeclonenodetrue.xml +416/808 hc_nodeclonetruecopytext.xml +417/808 hc_nodecommentnodeattributes.xml +418/808 hc_nodecommentnodename.xml +419/808 hc_nodecommentnodetype.xml +420/808 hc_nodecommentnodevalue.xml +421/808 hc_nodedocumentfragmentnodename.xml +422/808 hc_nodedocumentfragmentnodetype.xml +423/808 hc_nodedocumentfragmentnodevalue.xml +424/808 hc_nodedocumentnodeattribute.xml +425/808 hc_nodedocumentnodename.xml +426/808 hc_nodedocumentnodetype.xml +427/808 hc_nodedocumentnodevalue.xml +428/808 hc_nodeelementnodeattributes.xml +429/808 hc_nodeelementnodename.xml +430/808 hc_nodeelementnodetype.xml +431/808 hc_nodeelementnodevalue.xml +432/808 hc_nodegetfirstchild.xml +433/808 hc_nodegetfirstchildnull.xml +434/808 hc_nodegetlastchild.xml +435/808 hc_nodegetlastchildnull.xml +436/808 hc_nodegetnextsibling.xml +437/808 hc_nodegetnextsiblingnull.xml +438/808 hc_nodegetownerdocument.xml +439/808 hc_nodegetownerdocumentnull.xml +440/808 hc_nodegetprevioussibling.xml +441/808 hc_nodegetprevioussiblingnull.xml +442/808 hc_nodehaschildnodes.xml +443/808 hc_nodehaschildnodesfalse.xml +444/808 hc_nodeinsertbefore.xml +445/808 hc_nodeinsertbeforedocfragment.xml +446/808 hc_nodeinsertbeforeinvalidnodetype.xml +447/808 hc_nodeinsertbeforenewchilddiffdocument.xml +448/808 hc_nodeinsertbeforenewchildexists.xml +449/808 hc_nodeinsertbeforenodeancestor.xml +450/808 hc_nodeinsertbeforenodename.xml +451/808 hc_nodeinsertbeforerefchildnonexistent.xml +452/808 hc_nodeinsertbeforerefchildnull.xml +453/808 hc_nodelistindexequalzero.xml +454/808 hc_nodelistindexgetlength.xml +455/808 hc_nodelistindexgetlengthofemptylist.xml +456/808 hc_nodelistindexnotzero.xml +457/808 hc_nodelistreturnfirstitem.xml +458/808 hc_nodelistreturnlastitem.xml +459/808 hc_nodelisttraverselist.xml +460/808 hc_nodeparentnode.xml +461/808 hc_nodeparentnodenull.xml +462/808 hc_noderemovechild.xml +463/808 hc_noderemovechildgetnodename.xml +464/808 hc_noderemovechildnode.xml +465/808 hc_noderemovechildoldchildnonexistent.xml +466/808 hc_nodereplacechild.xml +467/808 hc_nodereplacechildinvalidnodetype.xml +468/808 hc_nodereplacechildnewchilddiffdocument.xml +469/808 hc_nodereplacechildnodeancestor.xml +470/808 hc_nodereplacechildnodename.xml +471/808 hc_nodereplacechildoldchildnonexistent.xml +472/808 hc_nodetextnodeattribute.xml +473/808 hc_nodetextnodename.xml +474/808 hc_nodetextnodetype.xml +475/808 hc_nodetextnodevalue.xml +476/808 hc_nodevalue01.xml +477/808 hc_nodevalue02.xml +478/808 hc_nodevalue03.xml +479/808 hc_nodevalue04.xml +480/808 hc_nodevalue05.xml +481/808 hc_nodevalue06.xml +482/808 hc_nodevalue07.xml +483/808 hc_nodevalue08.xml +484/808 hc_notationsremovenameditem1.xml +485/808 hc_notationssetnameditem1.xml +486/808 hc_textindexsizeerrnegativeoffset.xml implementationAttribute signed not supported, skipping test -487/525 hc_textindexsizeerroffsetoutofbounds.xml -488/525 hc_textparseintolistofelements.xml -489/525 hc_textsplittextfour.xml -490/525 hc_textsplittextone.xml -491/525 hc_textsplittextthree.xml -492/525 hc_textsplittexttwo.xml -493/525 hc_textwithnomarkup.xml -494/525 hc_attrappendchild1.xml -495/525 hc_attrappendchild2.xml -496/525 hc_attrappendchild3.xml -497/525 hc_attrappendchild4.xml -498/525 hc_attrappendchild5.xml -499/525 hc_attrappendchild6.xml -500/525 hc_attrchildnodes1.xml -501/525 hc_attrchildnodes2.xml -502/525 hc_attrclonenode1.xml -503/525 hc_attrfirstchild.xml -504/525 hc_attrgetvalue1.xml -505/525 hc_attrgetvalue2.xml -506/525 hc_attrhaschildnodes.xml -507/525 hc_attrinsertbefore1.xml -508/525 hc_attrinsertbefore2.xml -509/525 hc_attrinsertbefore3.xml -510/525 hc_attrinsertbefore4.xml -511/525 hc_attrinsertbefore5.xml -512/525 hc_attrinsertbefore6.xml -513/525 hc_attrinsertbefore7.xml -514/525 hc_attrlastchild.xml -515/525 hc_attrnormalize.xml -516/525 hc_attrremovechild1.xml -517/525 hc_attrremovechild2.xml -518/525 hc_attrreplacechild1.xml -519/525 hc_attrreplacechild2.xml -520/525 hc_attrsetvalue1.xml -521/525 hc_attrsetvalue2.xml -522/525 attrremovechild1.xml -523/525 attrreplacechild1.xml -0/497 tests failed; 28 tests were skipped \ No newline at end of file +487/808 hc_textindexsizeerroffsetoutofbounds.xml +488/808 hc_textparseintolistofelements.xml +489/808 hc_textsplittextfour.xml +490/808 hc_textsplittextone.xml +491/808 hc_textsplittextthree.xml +492/808 hc_textsplittexttwo.xml +493/808 hc_textwithnomarkup.xml +494/808 hc_attrappendchild1.xml +495/808 hc_attrappendchild2.xml +496/808 hc_attrappendchild3.xml +497/808 hc_attrappendchild4.xml +498/808 hc_attrappendchild5.xml +499/808 hc_attrappendchild6.xml +500/808 hc_attrchildnodes1.xml +501/808 hc_attrchildnodes2.xml +502/808 hc_attrclonenode1.xml +503/808 hc_attrfirstchild.xml +504/808 hc_attrgetvalue1.xml +505/808 hc_attrgetvalue2.xml +506/808 hc_attrhaschildnodes.xml +507/808 hc_attrinsertbefore1.xml +508/808 hc_attrinsertbefore2.xml +509/808 hc_attrinsertbefore3.xml +510/808 hc_attrinsertbefore4.xml +511/808 hc_attrinsertbefore5.xml +512/808 hc_attrinsertbefore6.xml +513/808 hc_attrinsertbefore7.xml +514/808 hc_attrlastchild.xml +515/808 hc_attrnormalize.xml +516/808 hc_attrremovechild1.xml +517/808 hc_attrremovechild2.xml +518/808 hc_attrreplacechild1.xml +519/808 hc_attrreplacechild2.xml +520/808 hc_attrsetvalue1.xml +521/808 hc_attrsetvalue2.xml +522/808 attrremovechild1.xml +523/808 attrreplacechild1.xml +0/497 tests failed; 311 tests were skipped \ No newline at end of file diff --git a/README.html b/README.html index cbbee55..0e1a422 100644 --- a/README.html +++ b/README.html @@ -96,6 +96,7 @@ reported as instances of well-formedness-violation. We also print line number information. +
  • Support internal subset serialization.
  • Gilbert Baumann has clarified the license as Lisp-LGPL.
  • rel-2005-06-25

    diff --git a/doc/installation.html b/doc/installation.html index 3ec81cf..093b3ea 100644 --- a/doc/installation.html +++ b/doc/installation.html @@ -103,7 +103,8 @@ $ cvs co cxml

    Prerequisites. - CXML needs the puri library. + CXML needs the puri library + as well as trivial-gray-streams.

    @@ -125,7 +126,7 @@ $ cvs co cxml $ cvs login # password is "anonymous" $ cvs co 2001/XML-Test-Suite/xmlconf $ cvs co -D '2005-05-06 23:00' 2001/DOM-Test-Suite -$ cd 2001/DOM-Test-Suite && ant dom1-dtd +$ cd 2001/DOM-Test-Suite && ant dom1-dtd dom2-dtd

    Omit -D to get the latest version, which may not work with cxml yet. The ant step is necessary to run the DOM diff --git a/doc/using.html b/doc/using.html index 25d0eea..a2ba80e 100644 --- a/doc/using.html +++ b/doc/using.html @@ -613,6 +613,8 @@ NIL

    Function SAX:START-DTD (handler name public-id system-id)
    Function SAX:END-DTD (handler)
    +
    Function SAX:START-INTERNAL-SUBSET (handler)
    +
    Function SAX:END-INTERNAL-SUBSET (handler)
    Function SAX:UNPARSED-ENTITY-DECLARATION (handler name public-id system-id notation-name)
    Function SAX:EXTERNAL-ENTITY-DECLARATION (handler kind name public-id system-id)
    Function SAX:INTERNAL-ENTITY-DECLARATION (handler kind name value)
    @@ -623,9 +625,9 @@ NIL
    Accessor SAX:ATTRIBUTE-PREFIX (attribute)
    Accessor SAX:ATTRIBUTE-NAMESPACE-URI (attribute)
    Accessor SAX:ATTRIBUTE-LOCAL-NAME (attribute)
    -
    Accessor SAX:ATTRIBUTE-VALUE (attribute)
    Accessor SAX:ATTRIBUTE-QNAME (attribute)
    Accessor SAX:ATTRIBUTE-SPECIFIED-P (attribute)
    +
    Accessor SAX:ATTRIBUTE-VALUE (attribute)

    The entity declaration methods are similar to Java SAX diff --git a/dom/dom-builder.lisp b/dom/dom-builder.lisp index dc16c04..8f5d9f6 100644 --- a/dom/dom-builder.lisp +++ b/dom/dom-builder.lisp @@ -12,7 +12,8 @@ (defclass dom-builder () ((document :initform nil :accessor document) - (element-stack :initform '() :accessor element-stack))) + (element-stack :initform '() :accessor element-stack) + (internal-subset :accessor internal-subset))) (defun dom:make-dom-builder () (make-instance 'dom-builder)) @@ -39,26 +40,48 @@ (setf (slot-value (document handler) 'entity-resolver) resolver)) (defmethod sax:start-dtd ((handler dom-builder) name publicid systemid) - (declare (ignore publicid systemid)) (let* ((document (document handler)) - (doctype (make-instance 'dom-impl::document-type - :name name - :notations (make-instance 'dom-impl::named-node-map - :element-type :notation - :owner document) - :entities (make-instance 'dom-impl::named-node-map - :element-type :entity - :owner document)))) + (doctype + (dom:create-document-type 'implementation name publicid systemid))) (setf (slot-value doctype 'dom-impl::owner) document + (slot-value (dom:notations doctype) 'dom-impl::owner) document + (slot-value (dom:entities doctype) 'dom-impl::owner) document (slot-value document 'dom-impl::doc-type) doctype))) +(defmethod sax:start-internal-subset ((handler dom-builder)) + (setf (internal-subset handler) nil)) + +(defmethod sax:end-internal-subset ((handler dom-builder)) + (setf (internal-subset (slot-value (document handler) 'dom-impl::doc-type)) + (nreverse (internal-subset handler))) + (slot-makunbound handler 'internal-subset)) + +(macrolet ((defhandler (name &rest args) + `(defmethod ,name ((handler dom-builder) ,@args) + (when (slot-boundp handler 'internal-subset) + (push (list ',name ,@args) (internal-subset handler)))))) + (defhandler sax:unparsed-entity-declaration + name public-id system-id notation-name) + (defhandler sax:external-entity-declaration + kind name public-id system-id) + (defhandler sax:internal-entity-declaration + kind name value) + (defhandler sax:notation-declaration + name public-id system-id) + (defhandler sax:element-declaration + name model) + (defhandler sax:attribute-declaration + element-name attribute-name type default)) + (defmethod sax:start-element ((handler dom-builder) namespace-uri local-name qname attributes) - (declare (ignore namespace-uri local-name)) (with-slots (document element-stack) handler (let ((element (make-instance 'element :tag-name qname - :owner document)) + :owner document + :namespace-uri namespace-uri + :local-name local-name + :prefix (cxml::split-qname (cxml::rod qname)))) (parent (car element-stack)) (anodes '())) (dolist (attr attributes) @@ -68,6 +91,7 @@ (dom:create-text-node document (sax:attribute-value attr)))) (setf (slot-value anode 'dom-impl::specified-p) (sax:attribute-specified-p attr)) + (setf (slot-value anode 'dom-impl::owner-element) element) (dom:append-child anode text) (push anode anodes))) (setf (slot-value element 'dom-impl::parent) parent) diff --git a/dom/dom-impl.lisp b/dom/dom-impl.lisp index 385eb95..7e0a6bf 100644 --- a/dom/dom-impl.lisp +++ b/dom/dom-impl.lisp @@ -8,7 +8,8 @@ ;;;; Author: knowledgeTools Int. GmbH (defpackage :dom-impl - (:use :cl :runes)) + (:use :cl :runes) + (:export #:create-document)) (in-package :dom-impl) @@ -33,6 +34,15 @@ (read-only-p :initform nil :reader read-only-p) (map :initform nil))) +(defmethod dom:prefix ((node node)) nil) +(defmethod dom:local-name ((node node)) nil) +(defmethod dom:namespace-uri ((node node)) nil) + +(defclass namespace-mixin () + ((prefix :initarg :prefix :reader dom:prefix) + (local-name :initarg :local-name :reader dom:local-name) + (namespace-uri :initarg :namespace-uri :reader dom:namespace-uri))) + (defclass document (node) ((doc-type :initarg :doc-type :reader dom:doctype) (dtd :initform nil :reader dtd) @@ -44,8 +54,9 @@ (defclass character-data (node) ((value :initarg :data :reader dom:data))) -(defclass attribute (node) +(defclass attribute (namespace-mixin node) ((name :initarg :name :reader dom:name) + (owner-element :initarg :owner-element :reader dom:owner-element) (specified-p :initarg :specified-p :reader dom:specified))) (defmethod print-object ((object attribute) stream) @@ -54,7 +65,7 @@ (rod-string (dom:name object)) (rod-string (dom:value object))))) -(defclass element (node) +(defclass element (namespace-mixin node) ((tag-name :initarg :tag-name :reader dom:tag-name) (attributes :initarg :attributes :reader dom:attributes))) @@ -73,8 +84,11 @@ (defclass document-type (node) ((name :initarg :name :reader dom:name) + (public-id :initarg :public-id :reader dom:public-id) + (system-id :initarg :system-id :reader dom:system-id) (entities :initarg :entities :reader dom:entities) - (notations :initarg :notations :reader dom:notations))) + (notations :initarg :notations :reader dom:notations) + (internal-subset :accessor internal-subset))) (defclass notation (node) ((name :initarg :name :reader dom:name) @@ -176,6 +190,45 @@ (:NOT_SUPPORTED_ERR 9) (:INUSE_ATTRIBUTE_ERR 10))) +;; dom-implementation protocol + +(defmethod dom:has-feature ((factory (eql 'implementation)) feature version) + (and (or (string-equal (rod-string feature) "xml") + (string-equal (rod-string feature) "core")) + (or (string-equal (rod-string version) "1.0") + (string-equal (rod-string version) "2.0")))) + +(defmethod dom:create-document-type + ((factory (eql 'implementation)) name publicid systemid) + (make-instance 'dom-impl::document-type + :name name + :notations (make-instance 'dom-impl::named-node-map + :element-type :notation + :owner nil) + :entities (make-instance 'dom-impl::named-node-map + :element-type :entity + :owner nil) + :public-id publicid + :system-id systemid)) + +(defmethod dom:create-document + ((factory (eql 'implementation)) uri qname doctype) + (let ((document (make-instance 'dom-impl::document))) + (setf (slot-value document 'owner) nil + (slot-value document 'doc-type) doctype + (slot-value document 'namespace-uri) uri) + (setf (values (slot-value document 'prefix) + (slot-value document 'local-name)) + (safe-split-qname qname uri)) + (when doctype + (unless (typep doctype 'document-type) + (dom-error :WRONG_DOCUMENT_ERR + "doctype was created by a different dom implementation")) + (setf (slot-value doctype 'dom-impl::owner) document + (slot-value (dom:notations doctype) 'dom-impl::owner) document + (slot-value (dom:entities doctype) 'dom-impl::owner) document)) + document)) + ;; document-fragment protocol ;; document protocol @@ -191,8 +244,11 @@ (setf tag-name (rod tag-name)) (unless (cxml::valid-name-p tag-name) (dom-error :INVALID_CHARACTER_ERR "not a name: ~A" (rod-string tag-name))) - (let ((result (make-instance 'element + (let ((result (make-instance 'element :tag-name tag-name + :namespace-uri nil + :local-name nil + :prefix nil :owner document))) (setf (slot-value result 'attributes) (make-instance 'attribute-node-map @@ -202,6 +258,41 @@ (add-default-attributes result) result)) +(defun safe-split-qname (qname uri) + (unless (cxml::valid-name-p qname) + (dom-error :INVALID_CHARACTER_ERR "not a name: ~A" (rod-string qname))) + (multiple-value-bind (prefix local-name) + (handler-case + (cxml::split-qname qname) + (cxml:well-formedness-violation (c) + (dom-error :NAMESPACE_ERR "~A" c))) + (when prefix + (when (and (rod= prefix "xml") + (not (rod= uri "http://www.w3.org/XML/1998/namespace"))) + (dom-error :NAMESPACE_ERR "invalid uri for prefix `xml'")) + (when (and (rod= prefix "xmlns") + (not (rod= uri "http://www.w3.org/2000/xmlns/"))) + (dom-error :NAMESPACE_ERR "invalid uri for prefix `xmlns'"))) + (values prefix local-name))) + +(defmethod dom:create-element-ns ((document document) uri qname) + (setf qname (rod qname)) + (multiple-value-bind (prefix local-name) + (safe-split-qname qname uri) + (let ((result (make-instance 'element + :tag-name qname + :namespace-uri uri + :local-name local-name + :prefix prefix + :owner document))) + (setf (slot-value result 'attributes) + (make-instance 'attribute-node-map + :element-type :attribute + :owner document + :element result)) + (add-default-attributes result) + result))) + (defmethod dom:create-document-fragment ((document document)) (make-instance 'document-fragment :owner document)) @@ -240,9 +331,25 @@ (dom-error :INVALID_CHARACTER_ERR "not a name: ~A" (rod-string name))) (make-instance 'attribute :name name + :local-name nil + :prefix nil + :namespace-uri nil :specified-p t :owner document)) +(defmethod dom:create-attribute-ns ((document document) uri qname) + (setf uri (rod uri)) + (setf qname (rod qname)) + (multiple-value-bind (prefix local-name) + (safe-split-qname qname uri) + (make-instance 'attribute + :name qname + :namespace-uri uri + :local-name local-name + :prefix prefix + :specified-p t + :owner document))) + (defmethod dom:create-entity-reference ((document document) name) (setf name (rod name)) (unless (cxml::valid-name-p name) @@ -253,23 +360,66 @@ (defmethod get-elements-by-tag-name-internal (node tag-name) (setf tag-name (rod tag-name)) - (let ((result (make-node-list))) - (setf tag-name (rod tag-name)) - (let ((wild-p (rod= tag-name '#.(string-rod "*")))) - (labels ((walk (n) - (dovector (c (dom:child-nodes n)) - (when (dom:element-p c) - (when (or wild-p (rod= tag-name (dom:node-name c))) - (vector-push-extend c result (extension result))) - (walk c))))) - (walk node))) + (let ((result (make-node-list)) + (wild-p (rod= tag-name '#.(string-rod "*")))) + (labels ((walk (n) + (dovector (c (dom:child-nodes n)) + (when (dom:element-p c) + (when (or wild-p (rod= tag-name (dom:node-name c))) + (vector-push-extend c result (extension result))) + (walk c))))) + (walk node)) + result)) + +(defmethod get-elements-by-tag-name-internal-ns (node uri lname) + (setf uri (rod uri)) + (setf lname (rod lname)) + (let ((result (make-node-list)) + (wild-uri-p (rod= uri '#.(string-rod "*"))) + (wild-lname-p (rod= lname '#.(string-rod "*")))) + (labels ((walk (n) + (dovector (c (dom:child-nodes n)) + (when (dom:element-p c) + (when (and (or wild-lname-p (rod= lname (dom:local-name c))) + (or wild-uri-p (rod= uri (dom:namespace-uri c)))) + (vector-push-extend c result (extension result))) + (walk c))))) + (walk node)) result)) (defmethod dom:get-elements-by-tag-name ((document document) tag-name) (get-elements-by-tag-name-internal document tag-name)) +(defmethod dom:get-elements-by-tag-name-ns ((document document) uri lname) + (get-elements-by-tag-name-internal-ns document uri lname)) + +(defmethod dom:get-element-by-id ((document document) id) + (block nil + (unless (dtd document) + (return nil)) + (setf id (rod id)) + (labels ((walk (n) + (dovector (c (dom:child-nodes n)) + (when (dom:element-p c) + (let ((e (cxml::find-element + (cxml::rod (dom:tag-name c)) + (dtd document)))) + (when e + (dolist (a (cxml::elmdef-attributes e)) + (when (eq :ID (cxml::attdef-type a)) + (let* ((name (rod (cxml::attdef-name a))) + (value (dom:get-attribute c name))) + (when (and value (rod= value id)) + (return c))))))) + (walk c))))) + (walk document)))) + + ;;; Node +(defmethod dom:is-supported ((node node) feature version) + (dom:has-feature 'implementation feature version)) + (defmethod dom:parent-node ((node node)) (slot-value node 'parent)) @@ -544,29 +694,50 @@ (setf name (rod name)) (with-slots (items) self (dolist (k items nil) - (cond ((rod= name (dom:node-name k)) - (return k)))))) + (when (rod= name (dom:node-name k)) + (return k))))) -(defmethod dom:set-named-item ((self named-node-map) arg) - (assert-writeable self) - (unless (eq (dom:node-type arg) (slot-value self 'element-type)) +(defmethod dom:get-named-item-ns ((self named-node-map) uri lname) + (setf uri (rod uri)) + (setf lname (rod lname)) + (with-slots (items) self + (dolist (k items nil) + (when (and (equal uri (dom:namespace-uri k)) + (equal lname (dom:local-name k))) + (return k))))) + +(defun %set-named-item (map arg test) + (assert-writeable map) + (unless (eq (dom:node-type arg) (slot-value map 'element-type)) (dom-error :HIERARCHY_REQUEST_ERR "~S cannot adopt ~S, since it is not of type ~S." - self arg (slot-value self 'element-type))) - (unless (eq (dom:owner-document self) (dom:owner-document arg)) + map arg (slot-value map 'element-type))) + (unless (eq (dom:owner-document map) (dom:owner-document arg)) (dom-error :WRONG_DOCUMENT_ERR "~S cannot adopt ~S, since it was created by a different document." - self arg)) + map arg)) (let ((old-map (slot-value arg 'map))) - (when (and old-map (not (eq old-map self))) + (when (and old-map (not (eq old-map map))) (dom-error :INUSE_ATTRIBUTE_ERR "Attribute node already mapped" arg))) - (setf (slot-value arg 'map) self) + (setf (slot-value arg 'map) map) + (with-slots (items) map + (dolist (k items (progn (setf items (cons arg items)) nil)) + (when (funcall test k) + (setf items (cons arg (delete k items))) + (return k))))) + +(defmethod dom:set-named-item ((self named-node-map) arg) (let ((name (dom:node-name arg))) - (with-slots (items) self - (dolist (k items (progn (setf items (cons arg items))nil)) - (cond ((rod= name (dom:node-name k)) - (setf items (cons arg (delete k items))) - (return k))))))) + (%set-named-item self arg (lambda (k) (rod= name (dom:node-name k)))))) + +(defmethod dom:set-named-item-ns ((self named-node-map) arg) + (let ((uri (dom:namespace-uri arg)) + (lname (dom:local-name arg))) + (%set-named-item self + arg + (lambda (k) + (and (rod= lname (dom:local-name k)) + (rod= uri (dom:namespace-uri k))))))) (defmethod dom:remove-named-item ((self named-node-map) name) (assert-writeable self) @@ -577,6 +748,18 @@ (setf items (delete k items)) (return k)))))) +(defmethod dom:remove-named-item-ns ((self named-node-map) uri lname) + (assert-writeable self) + (setf uri (rod uri)) + (setf lname (rod lname)) + (with-slots (items) self + (dolist (k items + (dom-error :NOT_FOUND_ERR "~A not found in ~A" lname self)) + (when (and (rod= lname (dom:local-name k)) + (rod= uri (dom:namespace-uri k))) + (setf items (delete k items)) + (return k))))) + (defmethod dom:length ((self named-node-map)) (with-slots (items) self (length items))) @@ -743,6 +926,15 @@ ;;; ELEMENT +(defmethod dom:has-attributes ((element element)) + (plusp (length (dom:items (dom:attributes element))))) + +(defmethod dom:has-attribute ((element element) name) + (and (dom:get-named-item (dom:attributes element) name) t)) + +(defmethod dom:has-attribute-ns ((element element) uri lname) + (and (dom:get-named-item-ns (dom:attributes element) uri lname) t)) + (defmethod dom:get-attribute-node ((element element) name) (dom:get-named-item (dom:attributes element) name)) @@ -750,24 +942,51 @@ (assert-writeable element) (dom:set-named-item (dom:attributes element) new-attr)) +(defmethod dom:get-attribute-node-ns ((element element) uri lname) + (dom:get-named-item-ns (dom:attributes element) uri lname)) + +(defmethod dom:set-attribute-node-ns ((element element) (new-attr attribute)) + (assert-writeable element) + (dom:set-named-item-ns (dom:attributes element) new-attr)) + (defmethod dom:get-attribute ((element element) name) (let ((a (dom:get-attribute-node element name))) (if a (dom:value a) #.(string-rod "")))) +(defmethod dom:get-attribute-ns ((element element) uri lname) + (let ((a (dom:get-attribute-node-ns element uri lname))) + (if a + (dom:value a) + #.(string-rod "")))) + (defmethod dom:set-attribute ((element element) name value) (assert-writeable element) (with-slots (owner) element (let ((attr (dom:create-attribute owner name))) + (setf (slot-value attr 'owner-element) element) (setf (dom:value attr) value) (dom:set-attribute-node element attr)) (values))) +(defmethod dom:set-attribute-ns ((element element) uri lname value) + (assert-writeable element) + (with-slots (owner) element + (let ((attr (dom:create-attribute-ns owner uri lname))) + (setf (slot-value attr 'owner-element) element) + (setf (dom:value attr) value) + (dom:set-attribute-node-ns element attr)) + (values))) + (defmethod dom:remove-attribute ((element element) name) (assert-writeable element) (dom:remove-attribute-node element (dom:get-attribute-node element name))) +(defmethod dom:remove-attribute-ns ((elt element) uri lname) + (assert-writeable elt) + (dom:remove-attribute-node elt (dom:get-attribute-node-ns elt uri lname))) + (defmethod dom:remove-attribute-node ((element element) (old-attr attribute)) (assert-writeable element) (with-slots (items) (dom:attributes element) @@ -781,14 +1000,18 @@ (defun maybe-add-default-attribute (element name) (let* ((dtd (dtd (slot-value element 'owner))) - (e (when dtd (cxml::find-element (dom:tag-name element) dtd))) + (e (when dtd (cxml::find-element + (cxml::rod (dom:tag-name element)) + dtd))) (a (when e (cxml::find-attribute e name)))) (when (and a (listp (cxml::attdef-default a))) (add-default-attribute element a)))) (defun add-default-attributes (element) (let* ((dtd (dtd (slot-value element 'owner))) - (e (when dtd (cxml::find-element (dom:tag-name element) dtd)))) + (e (when dtd (cxml::find-element + (cxml::rod (dom:tag-name element)) + dtd)))) (when e (dolist (a (cxml::elmdef-attributes e)) (when (and a (listp (cxml::attdef-default a))) @@ -799,7 +1022,8 @@ (owner (slot-value element 'owner)) (anode (dom:create-attribute owner (cxml::attdef-name adef))) (text (dom:create-text-node owner value))) - (setf (slot-value anode 'dom-impl::specified-p) nil) + (setf (slot-value anode 'specified-p) nil) + (setf (slot-value anode 'owner-element) element) (dom:append-child anode text) (push anode (slot-value (dom:attributes element) 'items)))) @@ -810,8 +1034,16 @@ (assert-writeable element) (get-elements-by-tag-name-internal element name)) -(defmethod dom:normalize ((element element)) +(defmethod dom:get-elements-by-tag-name-ns ((element element) uri lname) (assert-writeable element) + (get-elements-by-tag-name-internal-ns element uri lname)) + +(defmethod dom:set-named-item :after ((self attribute-node-map) arg) + (setf (slot-value arg 'owner-element) + (slot-value self 'element))) + +(defmethod dom:normalize ((node node)) + (assert-writeable node) (labels ((walk (n) (when (eq (dom:node-type n) :element) (map nil #'walk (dom:items (dom:attributes n)))) @@ -837,7 +1069,7 @@ (setf previous child) (incf i)))))) (map nil #'walk (dom:child-nodes n)))) - (walk element)) + (walk node)) (values)) ;;; TEXT @@ -856,7 +1088,17 @@ ;;; COMMENT -- nix ;;; CDATA-SECTION -- nix -;;; DOCUMENT-TYPE -- missing +;;; DOCUMENT-TYPE + +(defmethod dom:internal-subset ((node document-type)) + ;; FIXME: encoding ist falsch, anderen sink nehmen! + (if (slot-boundp node 'internal-subset) + (with-output-to-string (stream) + (let ((sink (cxml:make-character-stream-sink stream))) + (dolist (def (internal-subset node)) + (apply (car def) sink (cdr def))))) + nil)) + ;;; NOTATION -- nix ;;; ENTITY -- nix @@ -978,6 +1220,9 @@ :owner document)) (result (import-node-internal 'element document node deep :attributes attributes + :namespace-uri (dom:namespace-uri node) + :local-name (dom:local-name node) + :prefix (dom:prefix node) :tag-name (dom:tag-name node)))) (setf (slot-value attributes 'element) result) (dolist (attribute (dom:items (dom:attributes node))) @@ -1034,7 +1279,7 @@ ;;; Erweiterung -(defun dom:create-document (&optional document-element) +(defun dom-impl:create-document (&optional document-element) ;; Um ein neues Dokumentenobject zu erzeugen, parsen wir einfach ein ;; Dummydokument. (let* ((handler (dom:make-dom-builder)) diff --git a/dom/dom-sax.lisp b/dom/dom-sax.lisp index 97fbce0..20eae72 100644 --- a/dom/dom-sax.lisp +++ b/dom/dom-sax.lisp @@ -11,26 +11,41 @@ (defun dom:map-document (handler document &key (include-xmlns-attributes sax:*include-xmlns-attributes*) + include-doctype include-default-values) (sax:start-document handler) - (let ((doctype (dom:doctype document))) - (when doctype - (sax:start-dtd handler (dom:name doctype) nil nil) - ;; need notations for canonical mode 2 - (let* ((ns (dom:notations doctype)) - (a (make-array (dom:length ns)))) - ;; get them - (dotimes (k (dom:length ns)) - (setf (elt a k) (dom:item ns k))) - ;; sort them - (setf a (sort a #'rod< :key #'dom:name)) - (loop for n across a do - (sax:notation-declaration handler - (dom:name n) - (dom:public-id n) - (dom:system-id n))) - ;; fixme: entities! - (sax:end-dtd handler)))) + (when include-doctype + (let ((doctype (dom:doctype document))) + (when doctype + (sax:start-dtd handler + (dom:name doctype) + (dom:public-id doctype) + (dom:system-id doctype)) + (ecase include-doctype + (:full-internal-subset + (when (slot-boundp doctype 'internal-subset) + (sax:start-internal-subset handler) + (dolist (def (internal-subset doctype)) + (apply (car def) handler (cdr def))) + (sax:end-internal-subset handler))) + (:canonical-notations + ;; need notations for canonical mode 2 + (let* ((ns (dom:notations doctype)) + (a (make-array (dom:length ns)))) + (when (plusp (dom:length ns)) + (sax:start-internal-subset handler) + ;; get them + (dotimes (k (dom:length ns)) + (setf (elt a k) (dom:item ns k))) + ;; sort them + (setf a (sort a #'rod< :key #'dom:name)) + (loop for n across a do + (sax:notation-declaration handler + (dom:name n) + (dom:public-id n) + (dom:system-id n))) + (sax:end-internal-subset handler))))) + (sax:end-dtd handler)))) (labels ((walk (node) (dom:do-node-list (child (dom:child-nodes node)) (ecase (dom:node-type child) diff --git a/dom/package.lisp b/dom/package.lisp index eb5cc52..efca132 100644 --- a/dom/package.lisp +++ b/dom/package.lisp @@ -12,7 +12,33 @@ ;; lisp-specific extensions #:make-dom-builder - ;; methods + ;; DOM 2 functions + #:owner-element + #:import-node + #:create-element-ns + #:create-attribute-ns + #:get-elements-by-tag-name-ns + #:get-element-by-id + #:get-named-item-ns + #:set-named-item-ns + #:remove-named-item-ns + #:is-supported + #:has-attributes + #:namespace-uri + #:prefix + #:local-name + #:internal-subset + #:create-document-type + #:create-document + #:get-attribute-ns + #:set-attribute-ns + #:remove-attribute-ns + #:get-attribute-node-ns + #:set-attribute-node-ns + #:has-attribute + #:has-attribute-ns + + ;; DOM 1 functions #:has-feature #:doctype #:implementation @@ -72,7 +98,6 @@ #:system-id #:notation-name #:target - #:import-node #:code ;; protocol classes diff --git a/dom/simple-dom.lisp b/dom/simple-dom.lisp deleted file mode 100644 index 5de8215..0000000 --- a/dom/simple-dom.lisp +++ /dev/null @@ -1,46 +0,0 @@ -(in-package :xml) - -;;; Implementation of a simple but faster DOM. - -(defclass simple-document () - ((children :initform nil :accessor simple-document-children))) - -(defstruct node - parent) - -(defstruct (processing-instruction (:include node)) - target - data) - -(defstruct (text (:include node) - (:constructor make-text-boa (parent data))) - data) - -(defstruct (element (:include node)) - gi - attributes - children) - -(defmethod dom:create-processing-instruction ((document simple-document) target data) - (make-processing-instruction :target target :data data)) - -(defmethod dom:append-child ((node element) child) - (setf (node-parent child) node) - (push child (element-children node))) - -(defmethod dom:append-child ((node simple-document) child) - (push child (simple-document-children node)) - nil) - -(defmethod dom:create-element ((document simple-document) name) - (make-element :gi name)) - -(defmethod dom:set-attribute ((node element) name value) - (push (cons name value) - (element-attributes node))) - -(defmethod dom:create-text-node ((document simple-document) data) - (make-text-boa nil data)) - -(defmethod dom:create-cdata-section ((document simple-document) data) - (make-text-boa nil data)) diff --git a/dom/string-dom.lisp b/dom/string-dom.lisp deleted file mode 100644 index 0830cb9..0000000 --- a/dom/string-dom.lisp +++ /dev/null @@ -1,66 +0,0 @@ -;;; A wrapper package STRING-DOM around the ordinary DOM presents -;;; DOMString as Lisp STRING. This was a workaround until -;;; RUNE-IS-CHARACTER was implemented, but might still be useful on -;;; Lisps without Unicode support. - -(defpackage :string-dom - (:use)) - -(eval-when (:compile-toplevel :load-toplevel :execute) - (do-external-symbols (var :dom) - (let* ((home-package - (if (member var '(dom:data dom:name dom:value dom:tag-name - dom:node-name dom:node-value - dom:substring-data dom:get-attribute - dom:set-attribute dom:public-id dom:system-id - dom:notation-name dom:target)) - :string-dom - :dom)) - (symbol (intern (symbol-name var) home-package))) - (import symbol :string-dom) - (export (list symbol) :string-dom)))) - -(defpackage :string-dom-impl (:use :cl)) -(in-package :string-dom-impl) - -(defun rod-to-string (frob) - (if (null frob) - nil - (map 'string #'code-char frob))) - -(defun string-dom:data (node) (rod-to-string (dom:data node))) -(defun string-dom:name (node) (rod-to-string (dom:name node))) -(defun string-dom:value (node) (rod-to-string (dom:value node))) -(defun string-dom:tag-name (node) (rod-to-string (dom:tag-name node))) -(defun string-dom:node-name (node) (rod-to-string (dom:node-name node))) -(defun string-dom:node-value (node) (rod-to-string (dom:node-value node))) - -(defun (setf string-dom:data) (newval node) - (setf (dom:data node) newval)) - -(defun (setf string-dom:value) (newval node) - (setf (dom:value node) newval)) - -(defun (setf string-dom:node-value) (newval node) - (setf (dom:node-value node) newval)) - -(defun string-dom:substring-data (node offset count) - (rod-to-string (dom:substring-data node offset count))) - -(defun string-dom:get-attribute (elt name) - (rod-to-string (dom:get-attribute elt name))) - -(defun string-dom:set-attribute (elt name value) - (dom:set-attribute elt (runes:rod name) (runes:rod value))) - -(defun string-dom:public-id (node) - (rod-to-string (dom:public-id node))) - -(defun string-dom:system-id (node) - (rod-to-string (dom:system-id node))) - -(defun string-dom:notation-name (node) - (rod-to-string (dom:notation-name node))) - -(defun string-dom:target (node) - (rod-to-string (dom:target node))) diff --git a/dom/unparse.lisp b/dom/unparse.lisp index d39a58f..d1b9296 100644 --- a/dom/unparse.lisp +++ b/dom/unparse.lisp @@ -1,9 +1,20 @@ (in-package :cxml) -(defun unparse-document-to-octets (doc &rest initargs) - (let ((sink (apply #'make-octet-vector-sink initargs))) - (dom:map-document sink doc :include-default-values t))) +(defun %unparse-document (sink doc canonical) + (dom:map-document sink + doc + :include-doctype (if (and canonical (>= canonical 2)) + :canonical-notations + nil) + :include-default-values t)) -(defun unparse-document (doc character-stream &rest initargs) - (let ((sink (apply #'make-character-stream-sink character-stream initargs))) - (dom:map-document sink doc :include-default-values t))) +(defun unparse-document-to-octets (doc &rest initargs &key canonical) + (%unparse-document (apply #'make-octet-vector-sink initargs) + doc + canonical)) + +(defun unparse-document (doc character-stream &rest initargs &key canonical) + (%unparse-document + (apply #'make-character-stream-sink character-stream initargs) + doc + canonical)) diff --git a/test/domtest.lisp b/test/domtest.lisp index 7ceb3f9..cc7c2dd 100644 --- a/test/domtest.lisp +++ b/test/domtest.lisp @@ -142,11 +142,14 @@ (c = (elt str i)) :until (runes:rune= c #.(runes:char-rune #\"))) (if (runes:rune= c #.(runes:char-rune #\\)) - (ecase (progn + (let ((frob + (progn (incf i) - (elt str i)) - ;; ... - (#/n (vector-push-extend #/newline v (length v)))) + (elt str i)))) + (ecase frob + ;; ... + (#/n (vector-push-extend #/newline v (length v))) + ((#/\\ #/\") (vector-push-extend #/\\ v (length v))))) (vector-push-extend c v (length v)))) (coerce v 'runes::simple-rod))) (t @@ -163,13 +166,14 @@ ;;;; dom1-interfaces.xml auslesen -(defvar *methods* '()) -(defvar *fields* '()) +(defparameter *methods* '()) +(defparameter *fields* '()) (declaim (special *directory*)) +(declaim (special *files-directory*)) -(defun read-members () - (let* ((pathname (merge-pathnames "patches/dom1-interfaces.xml" *directory*)) +(defun read-members (&optional (directory *directory*)) + (let* ((pathname (merge-pathnames "build/dom2-interfaces.xml" directory)) (builder (dom:make-dom-builder)) (library (dom:document-element (cxml:parse-file pathname builder))) (methods '()) @@ -554,8 +558,15 @@ (defun assert-have-implementation-attribute (element) (let ((attribute (runes:rod-string (dom:get-attribute element "name")))) (string-case attribute + ;; fixme: expandEntityReferences sollten wir auch mal anschalten, wo + ;; wir uns schon die muehe machen... ("validating" (setf cxml::*validate* t)) + ("namespaceAware" + ;; ??? dom 2 ohne namespace-support gibt's doch gar nicht, + ;; ausser vielleicht in html-only implementationen, und dann sollen + ;; sie halt auf hasFeature "XML" testen. + ) (t (format t "~&implementationAttribute ~A not supported, skipping test~%" attribute) @@ -606,12 +617,9 @@ (defun load-file (name &optional will-be-modified-p) (declare (ignore will-be-modified-p)) (setf name (runes:rod-string name)) - (let* ((directory (merge-pathnames "tests/level1/core/files/" *directory*)) - (document - (cxml:parse-file - (make-pathname :name name :type "xml" :defaults directory) - (dom:make-dom-builder)))) - document)) + (cxml:parse-file + (make-pathname :name name :type "xml" :defaults *files-directory*) + (dom:make-dom-builder))) (defparameter *bad-tests* '("hc_elementnormalize2.xml" @@ -628,39 +636,57 @@ (defun run-all-tests (*directory* &optional verbose) (let* ((cxml::*redefinition-warning* nil) - (test-directory (merge-pathnames "tests/level1/core/" *directory*)) - (all-tests (merge-pathnames "alltests.xml" test-directory)) - (builder (dom:make-dom-builder)) - (suite (dom:document-element (cxml:parse-file all-tests builder))) (n 0) (i 0) (ntried 0) (nfailed 0)) - (do-child-elements (member suite) - (unless - (or (equal (dom:tag-name member) "metadata") - (member (runes:rod-string (dom:get-attribute member "href")) - *bad-tests* - :test 'equal)) - (incf n))) - (do-child-elements (member suite) - (let ((href (runes:rod-string (dom:get-attribute member "href")))) - (unless (or (runes:rod= (dom:tag-name member) #"metadata") - (member href *bad-tests* :test 'equal)) - (format t "~&~D/~D ~A~%" i n href) - (let ((lisp (slurp-test (merge-pathnames href test-directory)))) - (when verbose - (print lisp)) - (when lisp - (incf ntried) - (with-simple-restart (skip-test "Skip this test") - (handler-case - (let ((cxml::*validate* nil)) - (funcall (compile nil lisp))) - (serious-condition (c) - (incf nfailed) - (warn "test failed: ~A" c)))))) - (incf i)))) + (flet ((parse (test-directory) + (let* ((all-tests (merge-pathnames "alltests.xml" test-directory)) + (builder (dom:make-dom-builder)) + (suite (dom:document-element + (cxml:parse-file all-tests builder))) + (*files-directory* + (merge-pathnames "files/" test-directory))) + (do-child-elements (member suite) + (unless + (or (equal (dom:tag-name member) "metadata") + (member (runes:rod-string + (dom:get-attribute member "href")) + *bad-tests* + :test 'equal)) + (incf n))) + suite)) + (run (test-directory suite) + (print test-directory) + (let ((*files-directory* + (merge-pathnames "files/" test-directory))) + (do-child-elements (member suite) + (let ((href (runes:rod-string + (dom:get-attribute member "href")))) + (unless (or (runes:rod= (dom:tag-name member) #"metadata") + (member href *bad-tests* :test 'equal)) + (format t "~&~D/~D ~A~%" i n href) + (let ((lisp (slurp-test + (merge-pathnames href test-directory)))) + (when verbose + (print lisp)) + (when lisp + (incf ntried) + (with-simple-restart (skip-test "Skip this test") + (handler-case + (let ((cxml::*validate* nil)) + (funcall (compile nil lisp))) + (serious-condition (c) + (incf nfailed) + (warn "test failed: ~A" c)))))) + (incf i))))))) + (let* ((d1 (merge-pathnames "tests/level1/core/" *directory*)) + (d2 (merge-pathnames "tests/level2/core/" *directory*)) + (suite1 (parse d1)) + (suite2 (parse d2))) + (run d1 suite1) + #+(or) + (run d2 suite2))) (format t "~&~D/~D tests failed; ~D test~:P were skipped" nfailed ntried (- n ntried)))) diff --git a/xml/sax-handler.lisp b/xml/sax-handler.lisp index 4fa91e4..83f86e0 100644 --- a/xml/sax-handler.lisp +++ b/xml/sax-handler.lisp @@ -1,11 +1,13 @@ -;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: SAX; readtable: glisp; Encoding: utf-8; -*- +;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: SAX; readtable: runes; Encoding: utf-8; -*- ;;; --------------------------------------------------------------------------- ;;; Title: A SAX2-like API for the xml parser ;;; Created: 2003-06-30 ;;; Author: Henrik Motakef +;;; Author: David Lichteblau (DTD-related changes) ;;; License: BSD ;;; --------------------------------------------------------------------------- ;;; copyright 2003 by Henrik Motakef +;;; copyright 2004 knowledgeTools Int. GmbH ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are @@ -40,23 +42,22 @@ ;; * document-locator/(setf document-locator) ;; (probably implies a handler class with an appropriate slot) ;; * skipped-entity -;; * notation-declaration -;; * unparsed-entity-declaration ;; * The whole ErrorHandler class, this is better handled using ;; conditions (but isn't yet) -;; * The LexicalHandler (start-cdata etc) would be nice -;; * The DeclHandler interface (element-decl, attribute-decl...) -;; is useful, but the Java interface sucks. -;; o Despite all the namespace-uri etc arguments, namespaces are not -;; really supported yet, the xml parser always passes nil. This will -;; hopefully change Real Soon Now, and I didn't want to have to -;; rewrite the interface then +;; * The LexicalHandler (start-cdata etc) would be nice [-- partly done] (defpackage :sax (:use :common-lisp) (:export #:*namespace-processing* #:*include-xmlns-attributes* #:*use-xmlns-namespace* + + #:make-attribute + #:attribute-namespace-uri + #:attribute-local-name + #:attribute-qname + #:attribute-value + #:attribute-specified-p #:start-document #:start-prefix-mapping @@ -68,7 +69,18 @@ #:end-document #:comment #:start-cdata - #:end-cdata)) + #:end-cdata + #:start-dtd + #:end-dtd + #:start-internal-subset + #:end-internal-subset + #:unparsed-entity-declaration + #:external-entity-declaration + #:internal-entity-declaration + #:notation-declaration + #:element-declaration + #:attribute-declaration + #:entity-resolver)) (in-package :sax) @@ -118,6 +130,13 @@ qname: #\"xmlns:ex\" Setting this variable has no effect unless both `*namespace-processing*' and `*include-xmlns-attributes*' are non-nil.") +(defstruct attribute + namespace-uri + local-name + qname + value + specified-p) + (defgeneric start-document (handler) (:documentation "Called at the beginning of the parsing process, before any element, processing instruction or comment is reported. @@ -126,9 +145,6 @@ Handlers that need to maintain internal state may use this to perform any neccessary initializations.") (:method ((handler t)) nil)) -;; How should attributes be represented? -;; Currently its just a (name . value) alist, but this isn't too -;; useful wrt namespaced attributes. Probably a struct. (defgeneric start-element (handler namespace-uri local-name qname attributes) (:documentation "Called to report the beginning of an element. @@ -147,7 +163,9 @@ local-name properties, the same rules as for the element name apply. Additionally, namespace-declaring attributes (those whose name is \"xmlns\" or starts with \"xmlns:\") are only included if *namespace-prefixes* is non-nil.") - (:method ((handler t) namespace-uri local-name qname attributes) nil)) + (:method ((handler t) namespace-uri local-name qname attributes) + (declare (ignore namespace-uri local-name qname attributes)) + nil)) (defgeneric start-prefix-mapping (handler prefix uri) (:documentation "Called when the scope of a new prefix -> namespace-uri mapping begins. @@ -159,7 +177,7 @@ Clients don't usually have to implement this except under special circumstances, for example when they have to deal with qualified names in textual content. The parser will handle namespaces of elements and attributes on its own.") - (:method ((handler t) prefix uri) nil)) + (:method ((handler t) prefix uri) (declare (ignore prefix uri)) nil)) (defgeneric characters (handler data) (:documentation "Called for textual element content. @@ -167,13 +185,13 @@ attributes on its own.") The data is passed as a rod, with all entity references resolved. It is possible that the character content of an element is reported via multiple subsequent calls to this generic function.") - (:method ((handler t) data) nil)) + (:method ((handler t) data) (declare (ignore data)) nil)) (defgeneric processing-instruction (handler target data) (:documentation "Called when a processing instruction is read. Both target and data are rods.") - (:method ((handler t) target data) nil)) + (:method ((handler t) target data) (declare (ignore target data)) nil)) (defgeneric end-prefix-mapping (handler prefix) (:documentation "Called when a prefix -> namespace-uri mapping goes out of scope. @@ -186,14 +204,16 @@ Clients don't usually have to implement this except under special circumstances, for example when they have to deal with qualified names in textual content. The parser will handle namespaces of elements and attributes on its own.") - (:method ((handler t) prefix) nil)) + (:method ((handler t) prefix) prefix nil)) (defgeneric end-element (handler namespace-uri local-name qname) (:documentation "Called to report the end of an element. See the documentation for `start-element' for a description of the parameters.") - (:method ((handler t) namespace-uri local-name qname) nil)) + (:method ((handler t) namespace-uri local-name qname) + (declare (ignore namespace-uri local-name qname)) + nil)) (defgeneric end-document (handler) (:documentation "Called at the end of parsing a document. @@ -206,7 +226,7 @@ is significant, it will be returned by the parse-file/stream/string function.") ;; LexicalHandler (defgeneric comment (handler data) - (:method ((handler t) data) nil)) + (:method ((handler t) data) data nil)) (defgeneric start-cdata (handler) (:documentation "Called at the beginning of parsing a CDATA section. @@ -224,4 +244,88 @@ Handlers only have to implement this if they are interested in the lexical structure of the parsed document. The content of the CDATA section is reported via the `characters' generic function like all other textual content.") - (:method ((handler t)) nil)) \ No newline at end of file + (:method ((handler t)) nil)) + +(defgeneric start-dtd (handler name public-id system-id) + (:documentation "Called at the beginning of parsing a DTD.") + (:method ((handler t) name public-id system-id) + (declare (ignore name public-id system-id)) + nil)) + +(defgeneric end-dtd (handler) + (:documentation "Called at the end of parsing a DTD.") + (:method ((handler t)) nil)) + +(defgeneric start-internal-subset (handler) + (:documentation "Reports that an internal subset is present. Called before +any definition from the internal subset is reported.") + (:method ((handler t)) nil)) + +(defgeneric end-internal-subset (handler) + (:documentation "Called after processing of the internal subset has +finished, if present.") + (:method ((handler t)) nil)) + +(defgeneric unparsed-entity-declaration + (handler name public-id system-id notation-name) + (:documentation + "Called when an unparsed entity declaration is seen in a DTD.") + (:method ((handler t) name public-id system-id notation-name) + (declare (ignore name public-id system-id notation-name)) + nil)) + +(defgeneric external-entity-declaration + (handler kind name public-id system-id) + (:documentation + "Called when a parsed external entity declaration is seen in a DTD.") + (:method ((handler t) kind name public-id system-id) + (declare (ignore kind name public-id system-id)) + nil)) + +(defgeneric internal-entity-declaration + (handler kind name value) + (:documentation + "Called when an internal entity declaration is seen in a DTD.") + (:method ((handler t) kind name value) + (declare (ignore kind name value)) + nil)) + +(defgeneric notation-declaration + (handler name public-id system-id) + (:documentation + "Called when a notation declaration is seen while parsing a DTD.") + (:method ((handler t) name public-id system-id) + (declare (ignore name public-id system-id)) + nil)) + +(defgeneric element-declaration (handler name model) + (:documentation + "Called when a element declaration is seen in a DTD. Model is not a string, + but a nested list, with *, ?, +, OR, and AND being the operators, rods + as names, :EMPTY and :PCDATA as special tokens. (AND represents + sequences.)") + (:method ((handler t) name model) + (declare (ignore name model)) + nil)) + +(defgeneric attribute-declaration + (handler element-name attribute-name type default) + (:documentation + "Called when an attribute declaration is seen in a DTD. + type one of :CDATA, :ID, :IDREF, :IDREFS, + :ENTITY, :ENTITIES, :NMTOKEN, :NMTOKENS, + (:NOTATION *), or (:ENUMERATION *) + default :REQUIRED, :IMPLIED, (:FIXED content), or (:DEFAULT content)") + (:method ((handler t) element-name attribute-name type value) + (declare (ignore element-name attribute-name type value)) + nil)) + +(defgeneric entity-resolver + (handler resolver) + (:documentation + "Called between sax:end-dtd and sax:end-document to register an entity + resolver, a function of two arguments: An entity name and SAX handler. + When called, the resolver function will parse the named entities data.") + (:method ((handler t) resolver) + (declare (ignore resolver)) + nil)) diff --git a/xml/unparse.lisp b/xml/unparse.lisp index 7e642c7..cf93877 100644 --- a/xml/unparse.lisp +++ b/xml/unparse.lisp @@ -7,9 +7,9 @@ ;;; Author: David Lichteblau ;;; License: Lisp-LGPL (See file COPYING for details). ;;; --------------------------------------------------------------------------- -;;; © copyright 1999 by Gilbert Baumann -;;; © copyright 2004 by knowledgeTools Int. GmbH -;;; © copyright 2004 by David Lichteblau (for headcraft.de) +;;;  copyright 1999 by Gilbert Baumann +;;;  copyright 2004 by knowledgeTools Int. GmbH +;;;  copyright 2004 by David Lichteblau (for headcraft.de) ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Library General Public @@ -184,42 +184,185 @@ (unparse-string public-id sink) (write-rod #"\"" sink))))) +(defmethod sax:start-internal-subset ((sink sink)) + (ensure-doctype sink) + (write-rod #" [" sink) + (write-rune #/U+000A sink)) + +(defmethod sax:end-internal-subset ((sink sink)) + (ensure-doctype sink) + (write-rod #"]" sink)) + (defmethod sax:notation-declaration ((sink sink) name public-id system-id) - (when (and (canonical sink) (>= (canonical sink) 2)) - (let ((prev (previous-notation sink))) - (cond - (prev - (unless (rod< prev name) - (error "misordered notations; cannot unparse canonically"))) - (t - (ensure-doctype sink) - (write-rod #" [" sink) - (write-rune #/U+000A sink))) - (setf (previous-notation sink) name)) - (write-rod #"= (canonical sink) 2)) + prev + (not (rod< prev name))) + (error "misordered notations; cannot unparse canonically")) + (setf (previous-notation sink) name)) + (write-rod #" sink) + (write-rune #/U+000A sink)) + +(defmethod sax:unparsed-entity-declaration + ((sink sink) name public-id system-id notation-name) + (unless (and (canonical sink) (< (canonical sink) 3)) + (write-rod #" sink) (write-rune #/U+000A sink))) +(defmethod sax:external-entity-declaration + ((sink sink) kind name public-id system-id) + (when (canonical sink) + (error "cannot serialize parsed entities in canonical mode")) + (write-rod #" sink) + (write-rune #/U+000A sink)) + +(defmethod sax:internal-entity-declaration ((sink sink) kind name value) + (when (canonical sink) + (error "cannot serialize parsed entities in canonical mode")) + (write-rod #" sink) + (write-rune #/U+000A sink)) + +(defmethod sax:element-declaration ((sink sink) name model) + (when (canonical sink) + (error "cannot serialize element type declarations in canonical mode")) + (write-rod #" sink) + (write-rune #/U+000A sink)) + +(defmethod sax:attribute-declaration ((sink sink) ename aname type default) + (when (canonical sink) + (error "cannot serialize attribute type declarations in canonical mode")) + (write-rod #" sink) + (write-rune #/U+000A sink)) + (defmethod sax:end-dtd ((sink sink)) (when (have-doctype sink) - (when (previous-notation sink) - (write-rod #"]" sink)) (write-rod #">" sink) (write-rune #/U+000A sink))) diff --git a/xml/xml-parse.lisp b/xml/xml-parse.lisp index eb79275..dbf25bc 100644 --- a/xml/xml-parse.lisp +++ b/xml/xml-parse.lisp @@ -1517,7 +1517,6 @@ delim)))))) (defun read-character-reference (input) - ;; xxx eof handling ;; The #/& is already read (let ((res (let ((c (read-rune input))) @@ -2080,9 +2079,9 @@ ;;; to indicate whether the end tag is valid. ;;; ;;; Function B will be called with the character data rod as its argument, it -;;; returns a boolean indicating whether this text element is allowed. +;;; returns a boolean indicating whether this text node is allowed. ;;; -;;; That is, if one of the functions ever returns NIL, the element is +;;; That is, if one of the functions ever returns NIL, the node is ;;; rejected as invalid. (defun cmodel-done (actual-value) @@ -2471,6 +2470,7 @@ (wf-error input "document includes an internal subset")) (ensure-dtd) (consume-token input) + (sax:start-internal-subset (handler *ctx*)) (while (progn (p/S? input) (not (eq (peek-token input) :\] ))) (if (eq (peek-token input) :PE-REFERENCE) @@ -2487,6 +2487,7 @@ (let ((*expand-pe-p* t)) (p/markup-decl input)))) (consume-token input) + (sax:end-internal-subset (handler *ctx*)) (p/S? input)) (expect input :>) (when extid