spectest.xml 131 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845
  1. <!DOCTYPE testSuite [
  2. <!ENTITY dii "<&#xE14;&#xE35;/>">
  3. ]>
  4. <testSuite>
  5. <author>James Clark</author>
  6. <email>jjc@jclark.com</email>
  7. <documentation>For October 26 version of the spec.</documentation>
  8. <testSuite>
  9. <section>3</section>
  10. <testSuite>
  11. <documentation>Various possible syntax errors.</documentation>
  12. <testCase>
  13. <section>3</section>
  14. <incorrect>
  15. <thisIsJunk/>
  16. </incorrect>
  17. </testCase>
  18. <testCase>
  19. <section>3</section>
  20. <incorrect>
  21. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  22. <element name="foo">
  23. <empty/>
  24. </element>
  25. <start>
  26. <element name="foo">
  27. <empty/>
  28. </element>
  29. </start>
  30. </grammar>
  31. </incorrect>
  32. </testCase>
  33. <testCase>
  34. <section>3</section>
  35. <incorrect>
  36. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  37. <define name="bar">
  38. <text/>
  39. </define>
  40. <text/>
  41. </element>
  42. </incorrect>
  43. </testCase>
  44. <testCase>
  45. <section>3</section>
  46. <incorrect>
  47. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  48. <name>foo</name>
  49. <empty/>
  50. </element>
  51. </incorrect>
  52. </testCase>
  53. <testCase>
  54. <section>3</section>
  55. <incorrect>
  56. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  57. <group>
  58. <name>bar</name>
  59. </group>
  60. </element>
  61. </incorrect>
  62. </testCase>
  63. <testCase>
  64. <section>3</section>
  65. <incorrect>
  66. <element xmlns="http://relaxng.org/ns/structure/1.0">
  67. <anyName>
  68. <except>
  69. <name>foo</name>
  70. </except>
  71. <except>
  72. <name>bar</name>
  73. </except>
  74. </anyName>
  75. <empty/>
  76. </element>
  77. </incorrect>
  78. </testCase>
  79. <testCase>
  80. <section>3</section>
  81. <incorrect>
  82. <element xmlns="http://relaxng.org/ns/structure/1.0">
  83. <nsName>
  84. <except>
  85. <name>foo</name>
  86. </except>
  87. <except>
  88. <name>bar</name>
  89. </except>
  90. </nsName>
  91. <empty/>
  92. </element>
  93. </incorrect>
  94. </testCase>
  95. <testCase>
  96. <section>3</section>
  97. <incorrect>
  98. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  99. <data type="token">
  100. <except>
  101. <value>foo</value>
  102. </except>
  103. <except>
  104. <value>bar</value>
  105. </except>
  106. </data>
  107. </element>
  108. </incorrect>
  109. </testCase>
  110. <testCase>
  111. <section>3</section>
  112. <incorrect>
  113. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  114. <empty name="bar"/>
  115. </element>
  116. </incorrect>
  117. </testCase>
  118. <testCase>
  119. <section>3</section>
  120. <incorrect>
  121. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo" extra="bar">
  122. <empty/>
  123. </element>
  124. </incorrect>
  125. </testCase>
  126. <testCase>
  127. <section>3</section>
  128. <incorrect>
  129. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  130. <empty>
  131. <empty/>
  132. </empty>
  133. </element>
  134. </incorrect>
  135. </testCase>
  136. <testCase>
  137. <section>3</section>
  138. <incorrect>
  139. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  140. <text>
  141. <empty/>
  142. </text>
  143. </element>
  144. </incorrect>
  145. </testCase>
  146. <testCase>
  147. <section>3</section>
  148. <incorrect>
  149. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  150. <choice>
  151. <text/>
  152. <notAllowed>
  153. <empty/>
  154. </notAllowed>
  155. </choice>
  156. </element>
  157. </incorrect>
  158. </testCase>
  159. <testCase>
  160. <section>3</section>
  161. <incorrect>
  162. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  163. <start>
  164. <ref name="foo">
  165. <empty/>
  166. </ref>
  167. </start>
  168. <define name="foo">
  169. <element name="foo">
  170. <empty/>
  171. </element>
  172. </define>
  173. </grammar>
  174. </incorrect>
  175. </testCase>
  176. <testCase>
  177. <section>3</section>
  178. <incorrect>
  179. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  180. <start>
  181. <grammar>
  182. <start>
  183. <parentRef name="foo">
  184. <empty/>
  185. </parentRef>
  186. </start>
  187. </grammar>
  188. </start>
  189. <define name="foo">
  190. <element name="foo">
  191. <empty/>
  192. </element>
  193. </define>
  194. </grammar>
  195. </incorrect>
  196. </testCase>
  197. </testSuite>
  198. <testSuite>
  199. <documentation>Tests for obsolete syntax</documentation>
  200. <testCase>
  201. <section>3</section>
  202. <incorrect>
  203. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  204. <start name="foo">
  205. <element name="foo">
  206. <empty/>
  207. </element>
  208. </start>
  209. </grammar>
  210. </incorrect>
  211. </testCase>
  212. <testCase>
  213. <section>3</section>
  214. <incorrect>
  215. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo" ns="http://www.example.com">
  216. <attribute name="bar" global="true">
  217. <text/>
  218. </attribute>
  219. </element>
  220. </incorrect>
  221. </testCase>
  222. <testCase>
  223. <section>3</section>
  224. <incorrect>
  225. <element xmlns="http://relaxng.org/ns/structure/1.0">
  226. <not>
  227. <name>foo</name>
  228. </not>
  229. <empty/>
  230. </element>
  231. </incorrect>
  232. </testCase>
  233. <testCase>
  234. <section>3</section>
  235. <incorrect>
  236. <element xmlns="http://relaxng.org/ns/structure/1.0">
  237. <difference>
  238. <anyName/>
  239. <name>foo</name>
  240. </difference>
  241. <empty/>
  242. </element>
  243. </incorrect>
  244. </testCase>
  245. <testCase>
  246. <section>3</section>
  247. <incorrect>
  248. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  249. <data type="token" key="foo"/>
  250. </element>
  251. </incorrect>
  252. </testCase>
  253. <testCase>
  254. <section>3</section>
  255. <incorrect>
  256. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  257. <data type="token" keyRef="foo"/>
  258. </element>
  259. </incorrect>
  260. </testCase>
  261. <testCase>
  262. <section>3</section>
  263. <incorrect>
  264. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  265. <keyRef name="foo">
  266. <data type="token"/>
  267. </keyRef>
  268. </element>
  269. </incorrect>
  270. </testCase>
  271. <testCase>
  272. <section>3</section>
  273. <incorrect>
  274. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  275. <key name="foo">
  276. <data type="token"/>
  277. </key>
  278. </element>
  279. </incorrect>
  280. </testCase>
  281. </testSuite>
  282. <testSuite>
  283. <documentation>Tests for missing attributes and child elements</documentation>
  284. <testCase>
  285. <section>3</section>
  286. <incorrect>
  287. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  288. </element>
  289. </incorrect>
  290. </testCase>
  291. <testCase>
  292. <section>3</section>
  293. <incorrect>
  294. <element xmlns="http://relaxng.org/ns/structure/1.0">
  295. <name>foo</name>
  296. </element>
  297. </incorrect>
  298. </testCase>
  299. <testCase>
  300. <section>3</section>
  301. <incorrect>
  302. <element xmlns="http://relaxng.org/ns/structure/1.0">
  303. </element>
  304. </incorrect>
  305. </testCase>
  306. <testCase>
  307. <section>3</section>
  308. <incorrect>
  309. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  310. <attribute/>
  311. </element>
  312. </incorrect>
  313. </testCase>
  314. <testCase>
  315. <section>3</section>
  316. <incorrect>
  317. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  318. <group/>
  319. </element>
  320. </incorrect>
  321. </testCase>
  322. <testCase>
  323. <section>3</section>
  324. <incorrect>
  325. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  326. <interleave/>
  327. </element>
  328. </incorrect>
  329. </testCase>
  330. <testCase>
  331. <section>3</section>
  332. <incorrect>
  333. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  334. <choice/>
  335. </element>
  336. </incorrect>
  337. </testCase>
  338. <testCase>
  339. <section>3</section>
  340. <incorrect>
  341. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  342. <optional/>
  343. </element>
  344. </incorrect>
  345. </testCase>
  346. <testCase>
  347. <section>3</section>
  348. <incorrect>
  349. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  350. <zeroOrMore/>
  351. </element>
  352. </incorrect>
  353. </testCase>
  354. <testCase>
  355. <section>3</section>
  356. <incorrect>
  357. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  358. <oneOrMore/>
  359. </element>
  360. </incorrect>
  361. </testCase>
  362. <testCase>
  363. <section>3</section>
  364. <incorrect>
  365. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  366. <list/>
  367. </element>
  368. </incorrect>
  369. </testCase>
  370. <testCase>
  371. <section>3</section>
  372. <incorrect>
  373. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  374. <mixed/>
  375. </element>
  376. </incorrect>
  377. </testCase>
  378. <testCase>
  379. <section>3</section>
  380. <incorrect>
  381. <element xmlns="http://relaxng.org/ns/structure/1.0">
  382. <choice/>
  383. <empty/>
  384. </element>
  385. </incorrect>
  386. </testCase>
  387. <testCase>
  388. <section>3</section>
  389. <incorrect>
  390. <element xmlns="http://relaxng.org/ns/structure/1.0">
  391. <anyName>
  392. <except/>
  393. </anyName>
  394. <empty/>
  395. </element>
  396. </incorrect>
  397. </testCase>
  398. <testCase>
  399. <section>3</section>
  400. <incorrect>
  401. <element xmlns="http://relaxng.org/ns/structure/1.0">
  402. <nsName ns="">
  403. <except/>
  404. </nsName>
  405. <empty/>
  406. </element>
  407. </incorrect>
  408. </testCase>
  409. <testCase>
  410. <section>3</section>
  411. <incorrect>
  412. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  413. <data type="string">
  414. <except/>
  415. </data>
  416. </element>
  417. </incorrect>
  418. </testCase>
  419. <testCase>
  420. <section>3</section>
  421. <incorrect>
  422. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  423. <data/>
  424. </element>
  425. </incorrect>
  426. </testCase>
  427. <testCase>
  428. <section>3</section>
  429. <incorrect>
  430. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  431. <data type="string">
  432. <param/>
  433. </data>
  434. </element>
  435. </incorrect>
  436. </testCase>
  437. <testCase>
  438. <section>3</section>
  439. <incorrect>
  440. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  441. <grammar>
  442. <start/>
  443. </grammar>
  444. </element>
  445. </incorrect>
  446. </testCase>
  447. <testCase>
  448. <section>3</section>
  449. <incorrect>
  450. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  451. <start>
  452. <element name="bar">
  453. <empty/>
  454. </element>
  455. </start>
  456. <define name="baz"/>
  457. </grammar>
  458. </incorrect>
  459. </testCase>
  460. <testCase>
  461. <section>3</section>
  462. <incorrect>
  463. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  464. <externalRef/>
  465. </element>
  466. </incorrect>
  467. </testCase>
  468. <testCase>
  469. <section>3</section>
  470. <incorrect>
  471. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  472. <include/>
  473. <start>
  474. <element name="foo">
  475. <empty/>
  476. </element>
  477. </start>
  478. </grammar>
  479. </incorrect>
  480. </testCase>
  481. <testCase>
  482. <section>3</section>
  483. <incorrect>
  484. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  485. <start>
  486. <element name="foo">
  487. <empty/>
  488. </element>
  489. </start>
  490. <define>
  491. <element name="bar">
  492. <empty/>
  493. </element>
  494. </define>
  495. </grammar>
  496. </incorrect>
  497. </testCase>
  498. <testCase>
  499. <section>3</section>
  500. <incorrect>
  501. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  502. <start>
  503. <ref/>
  504. </start>
  505. <define name="foo">
  506. <element name="foo">
  507. <empty/>
  508. </element>
  509. </define>
  510. </grammar>
  511. </incorrect>
  512. </testCase>
  513. <testCase>
  514. <section>3</section>
  515. <incorrect>
  516. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  517. <start>
  518. <grammar>
  519. <start>
  520. <parentRef/>
  521. </start>
  522. </grammar>
  523. </start>
  524. <define name="foo">
  525. <element name="foo">
  526. <empty/>
  527. </element>
  528. </define>
  529. </grammar>
  530. </incorrect>
  531. </testCase>
  532. </testSuite>
  533. <testSuite>
  534. <documentation>Checking of ns attribute</documentation>
  535. <testCase>
  536. <section>3</section>
  537. <correct>
  538. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="">
  539. <empty/>
  540. </element>
  541. </correct>
  542. <valid>
  543. <foo/>
  544. </valid>
  545. </testCase>
  546. <testCase>
  547. <section>3</section>
  548. <documentation>No checking of ns attribute is performed</documentation>
  549. <correct>
  550. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="DAV:">
  551. <empty/>
  552. </element>
  553. </correct>
  554. <valid>
  555. <foo xmlns="DAV:"/>
  556. </valid>
  557. </testCase>
  558. <testCase>
  559. <section>3</section>
  560. <documentation>No checking of ns attribute is performed</documentation>
  561. <correct>
  562. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="xyzzy">
  563. <empty/>
  564. </element>
  565. </correct>
  566. </testCase>
  567. <testCase>
  568. <section>3</section>
  569. <documentation>No checking of ns attribute is performed</documentation>
  570. <correct>
  571. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="bad_scheme://">
  572. <empty/>
  573. </element>
  574. </correct>
  575. </testCase>
  576. </testSuite>
  577. <testSuite>
  578. <documentation>Checking of datatypeLibrary attribute</documentation>
  579. <testCase>
  580. <section>3</section>
  581. <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>
  582. <incorrect>
  583. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foo_bar:xyzzy">
  584. <empty/>
  585. </element>
  586. </incorrect>
  587. </testCase>
  588. <testCase>
  589. <section>3</section>
  590. <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>
  591. <correct>
  592. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foobar:xyzzy">
  593. <empty/>
  594. </element>
  595. </correct>
  596. <valid>
  597. <foo/>
  598. </valid>
  599. </testCase>
  600. <testCase>
  601. <section>3</section>
  602. <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>
  603. <correct>
  604. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http:ok">
  605. <empty/>
  606. </element>
  607. </correct>
  608. <valid>
  609. <foo/>
  610. </valid>
  611. </testCase>
  612. <testCase>
  613. <section>3</section>
  614. <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>
  615. <incorrect>
  616. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foo:">
  617. <empty/>
  618. </element>
  619. </incorrect>
  620. </testCase>
  621. <testCase>
  622. <section>3</section>
  623. <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>
  624. <incorrect>
  625. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.example.com/%">
  626. <empty/>
  627. </element>
  628. </incorrect>
  629. </testCase>
  630. <testCase>
  631. <section>3</section>
  632. <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>
  633. <incorrect>
  634. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.example.com/%xx">
  635. <empty/>
  636. </element>
  637. </incorrect>
  638. </testCase>
  639. <testCase>
  640. <section>3</section>
  641. <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>
  642. <correct>
  643. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.example.com/%Aa">
  644. <empty/>
  645. </element>
  646. </correct>
  647. <valid>
  648. <foo/>
  649. </valid>
  650. </testCase>
  651. <testCase>
  652. <section>3</section>
  653. <documentation>Value of datatypeLibrary attribute must not be relative</documentation>
  654. <incorrect>
  655. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy">
  656. <empty/>
  657. </element>
  658. </incorrect>
  659. </testCase>
  660. <testCase>
  661. <section>3</section>
  662. <documentation>Value of datatypeLibrary attribute must not be relative</documentation>
  663. <incorrect>
  664. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy#foo:bar">
  665. <empty/>
  666. </element>
  667. </incorrect>
  668. </testCase>
  669. <testCase>
  670. <section>3</section>
  671. <documentation>Value of datatypeLibrary attribute must not be relative</documentation>
  672. <incorrect>
  673. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy?foo:bar">
  674. <empty/>
  675. </element>
  676. </incorrect>
  677. </testCase>
  678. <testCase>
  679. <section>3</section>
  680. <documentation>Value of datatypeLibrary attribute must not be relative</documentation>
  681. <incorrect>
  682. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy/foo:bar">
  683. <empty/>
  684. </element>
  685. </incorrect>
  686. </testCase>
  687. <testCase>
  688. <section>3</section>
  689. <correct>
  690. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foo:bar">
  691. <empty/>
  692. </element>
  693. </correct>
  694. <valid>
  695. <foo/>
  696. </valid>
  697. </testCase>
  698. <testCase>
  699. <section>3</section>
  700. <correct>
  701. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="">
  702. <empty/>
  703. </element>
  704. </correct>
  705. <valid>
  706. <foo/>
  707. </valid>
  708. </testCase>
  709. <testCase>
  710. <section>3</section>
  711. <correct>
  712. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  713. <data datatypeLibrary="" type="string"/>
  714. </element>
  715. </correct>
  716. <valid>
  717. <foo>x</foo>
  718. </valid>
  719. </testCase>
  720. <testCase>
  721. <section>3</section>
  722. <documentation>Value of datatypeLibrary attribute must not contain fragment identifier</documentation>
  723. <incorrect>
  724. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"
  725. datatypeLibrary="http://www.example.com#xyzzy">
  726. <empty/>
  727. </element>
  728. </incorrect>
  729. </testCase>
  730. <testCase>
  731. <section>3</section>
  732. <documentation>Value of datatypeLibrary attribute must not contain fragment identifier</documentation>
  733. <incorrect>
  734. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"
  735. datatypeLibrary="http://www.example.com#">
  736. <empty/>
  737. </element>
  738. </incorrect>
  739. </testCase>
  740. </testSuite>
  741. <testSuite>
  742. <documentation>Tests for QName and NCNames in schemas</documentation>
  743. <testCase>
  744. <section>3</section>
  745. <correct>
  746. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  747. <element name="&#xE14;&#xE35;">
  748. <empty/>
  749. </element>
  750. </element>
  751. </correct>
  752. <valid>
  753. <foo>&dii;</foo>
  754. </valid>
  755. </testCase>
  756. <testCase>
  757. <section>3</section>
  758. <incorrect>
  759. <element name="&#xE35;" xmlns="http://relaxng.org/ns/structure/1.0">
  760. <empty/>
  761. </element>
  762. </incorrect>
  763. </testCase>
  764. <testCase>
  765. <section>3</section>
  766. <incorrect>
  767. <element name="" xmlns="http://relaxng.org/ns/structure/1.0">
  768. <empty/>
  769. </element>
  770. </incorrect>
  771. </testCase>
  772. <testCase>
  773. <section>3</section>
  774. <incorrect>
  775. <element xmlns="http://relaxng.org/ns/structure/1.0">
  776. <name>&#xE35;</name>
  777. <empty/>
  778. </element>
  779. </incorrect>
  780. </testCase>
  781. <testCase>
  782. <section>3</section>
  783. <incorrect>
  784. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  785. <attribute name="&#xE35;"/>
  786. <empty/>
  787. </element>
  788. </incorrect>
  789. </testCase>
  790. <testCase>
  791. <section>3</section>
  792. <incorrect>
  793. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  794. <start>
  795. <ref name="&#xE35;"/>
  796. </start>
  797. <define name="&#xE35;">
  798. <element name="foo">
  799. <empty/>
  800. </element>
  801. </define>
  802. </grammar>
  803. </incorrect>
  804. </testCase>
  805. <testCase>
  806. <section>3</section>
  807. <correct>
  808. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  809. <start>
  810. <ref name="&#xE14;&#xE35;"/>
  811. </start>
  812. <define name="&#xE14;&#xE35;">
  813. <element name="foo">
  814. <empty/>
  815. </element>
  816. </define>
  817. </grammar>
  818. </correct>
  819. <valid>
  820. <foo/>
  821. </valid>
  822. </testCase>
  823. <testCase>
  824. <section>3</section>
  825. <incorrect>
  826. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  827. <start>
  828. <ref name=""/>
  829. </start>
  830. <define name="">
  831. <element name="foo">
  832. <empty/>
  833. </element>
  834. </define>
  835. </grammar>
  836. </incorrect>
  837. </testCase>
  838. <testCase>
  839. <section>3</section>
  840. <incorrect>
  841. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  842. <start>
  843. <ref name="x y"/>
  844. </start>
  845. <define name="x y">
  846. <element name="foo">
  847. <empty/>
  848. </element>
  849. </define>
  850. </grammar>
  851. </incorrect>
  852. </testCase>
  853. <testCase>
  854. <section>3</section>
  855. <incorrect>
  856. <grammar xmlns="http://relaxng.org/ns/structure/1.0"
  857. xmlns:x="http://www.example.com/x">
  858. <start>
  859. <ref name="x:y"/>
  860. </start>
  861. <define name="x:y">
  862. <element name="foo">
  863. <empty/>
  864. </element>
  865. </define>
  866. </grammar>
  867. </incorrect>
  868. </testCase>
  869. <testCase>
  870. <section>3</section>
  871. <incorrect>
  872. <element xmlns="http://relaxng.org/ns/structure/1.0"
  873. xmlns:x="http://www.example.com/x"
  874. name="x:&#xE35;">
  875. <empty/>
  876. </element>
  877. </incorrect>
  878. </testCase>
  879. <testCase>
  880. <section>3</section>
  881. <incorrect>
  882. <element xmlns="http://relaxng.org/ns/structure/1.0"
  883. xmlns:x="http://www.example.com/x"
  884. name="x:y:z">
  885. <empty/>
  886. </element>
  887. </incorrect>
  888. </testCase>
  889. <testCase>
  890. <section>3</section>
  891. <incorrect>
  892. <element xmlns="http://relaxng.org/ns/structure/1.0"
  893. xmlns:x="http://www.example.com/x"
  894. name="x:">
  895. <empty/>
  896. </element>
  897. </incorrect>
  898. </testCase>
  899. </testSuite>
  900. <testSuite>
  901. <documentation>Tests for elements that allow only a single pattern child.</documentation>
  902. <testCase>
  903. <section>3</section>
  904. <incorrect>
  905. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  906. <start>
  907. <element name="foo">
  908. <empty/>
  909. </element>
  910. <empty/>
  911. </start>
  912. </grammar>
  913. </incorrect>
  914. </testCase>
  915. <testCase>
  916. <section>3</section>
  917. <incorrect>
  918. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  919. <attribute name="bar">
  920. <text/>
  921. <empty/>
  922. </attribute>
  923. </element>
  924. </incorrect>
  925. </testCase>
  926. <testCase>
  927. <section>3</section>
  928. <incorrect>
  929. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  930. <attribute>
  931. <name>bar</name>
  932. <text/>
  933. <empty/>
  934. </attribute>
  935. </element>
  936. </incorrect>
  937. </testCase>
  938. </testSuite>
  939. <testSuite>
  940. <documentation>Tests for foreign element and attribute handling.</documentation>
  941. <testCase>
  942. <section>3</section>
  943. <incorrect>
  944. <r:element name="foo" xmlns:r="http://relaxng.org/ns/structure/1.0" r:a="val">
  945. <r:empty/>
  946. </r:element>
  947. </incorrect>
  948. </testCase>
  949. <testCase>
  950. <section>3</section>
  951. <incorrect>
  952. <element xmlns="http://relaxng.org/ns/structure/1.0">
  953. <name>foo<eg:comment xmlns:eg="http://www.example.com"/></name>
  954. <empty/>
  955. </element>
  956. </incorrect>
  957. </testCase>
  958. <testCase>
  959. <section>3</section>
  960. <incorrect>
  961. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  962. <value>foo<eg:comment xmlns:eg="http://www.example.com"/></value>
  963. </element>
  964. </incorrect>
  965. </testCase>
  966. <testCase>
  967. <section>3</section>
  968. <correct>
  969. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  970. <data type="string"><eg:comment xmlns:eg="http://www.example.com"/></data>
  971. </element>
  972. </correct>
  973. <valid>
  974. <foo>X</foo>
  975. </valid>
  976. </testCase>
  977. <testCase>
  978. <section>3</section>
  979. <correct>
  980. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  981. <empty>
  982. <ext xmlns="http://www.example.com">
  983. <element xmlns="http://relaxng.org/ns/structure/1.0"/>
  984. </ext>
  985. </empty>
  986. </element>
  987. </correct>
  988. <valid>
  989. <foo/>
  990. </valid>
  991. </testCase>
  992. <testCase>
  993. <section>3</section>
  994. <correct>
  995. <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:eg="http://www.example.com">
  996. <eg:comment/>
  997. <eg:comment/>
  998. <start>
  999. <eg:comment/>
  1000. <element>
  1001. <eg:comment/>
  1002. <eg:comment/>
  1003. <name>foo</name>
  1004. <eg:comment/>
  1005. <data type="string"/>
  1006. <eg:comment/>
  1007. <empty>
  1008. <eg:comment/>
  1009. <eg:comment/>
  1010. </empty>
  1011. <eg:comment/>
  1012. <eg:comment/>
  1013. </element>
  1014. <eg:comment/>
  1015. </start>
  1016. <eg:comment/>
  1017. </grammar>
  1018. </correct>
  1019. <valid>
  1020. <foo>X</foo>
  1021. </valid>
  1022. </testCase>
  1023. <testCase>
  1024. <section>3</section>
  1025. <correct>
  1026. <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:eg="http://www.example.com"
  1027. eg:comment="">
  1028. <start eg:comment="">
  1029. <element eg:comment="">
  1030. <name eg:comment="">foo</name>
  1031. <data eg:comment="" type="string"/>
  1032. <empty eg:comment=""/>
  1033. </element>
  1034. </start>
  1035. </grammar>
  1036. </correct>
  1037. <valid>
  1038. <foo>X</foo>
  1039. </valid>
  1040. </testCase>
  1041. <testCase>
  1042. <section>3</section>
  1043. <correct>
  1044. <rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns="http://www.example.com">
  1045. <comment/>
  1046. <comment/>
  1047. <rng:start>
  1048. <comment/>
  1049. <rng:element>
  1050. <comment/>
  1051. <comment/>
  1052. <rng:name>foo</rng:name>
  1053. <comment/>
  1054. <rng:data type="string"/>
  1055. <comment/>
  1056. </rng:element>
  1057. <comment/>
  1058. </rng:start>
  1059. <comment/>
  1060. </rng:grammar>
  1061. </correct>
  1062. <valid>
  1063. <foo>X</foo>
  1064. </valid>
  1065. </testCase>
  1066. <testCase>
  1067. <section>3</section>
  1068. <correct>
  1069. <rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0">
  1070. <comment/>
  1071. <comment/>
  1072. <rng:start>
  1073. <comment/>
  1074. <rng:element>
  1075. <comment/>
  1076. <comment/>
  1077. <rng:name>foo</rng:name>
  1078. <comment/>
  1079. <rng:data type="string"/>
  1080. <comment/>
  1081. </rng:element>
  1082. <comment/>
  1083. </rng:start>
  1084. <comment/>
  1085. </rng:grammar>
  1086. </correct>
  1087. <valid>
  1088. <foo>X</foo>
  1089. </valid>
  1090. </testCase>
  1091. </testSuite>
  1092. </testSuite>
  1093. <testSuite>
  1094. <section>4</section>
  1095. <testSuite>
  1096. <section>4.2</section>
  1097. <testCase>
  1098. <section>4.2</section>
  1099. <correct>
  1100. <element name="&#xA;&#xD;&#x20;&#x9;foo&#xA;&#xD;&#x20;&#x9;" xmlns="http://relaxng.org/ns/structure/1.0">
  1101. <attribute name="&#xA;&#xD;&#x20;&#x9;bar&#xA;&#xD;&#x20;&#x9;"/>
  1102. </element>
  1103. </correct>
  1104. <valid>
  1105. <foo bar=""/>
  1106. </valid>
  1107. </testCase>
  1108. <testCase>
  1109. <section>4.2</section>
  1110. <correct>
  1111. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  1112. <value type="&#xA;&#xD;&#x20;&#x9;string&#xA;&#xD;&#x20;&#x9;">bar</value>
  1113. </element>
  1114. </correct>
  1115. <valid>
  1116. <foo>bar</foo>
  1117. </valid>
  1118. <invalid>
  1119. <foo>bar </foo>
  1120. </invalid>
  1121. </testCase>
  1122. <testCase>
  1123. <section>4.2</section>
  1124. <correct>
  1125. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  1126. <data type="&#xA;&#xD;&#x20;&#x9;string&#xA;&#xD;&#x20;&#x9;"/>
  1127. </element>
  1128. </correct>
  1129. <valid>
  1130. <foo>X</foo>
  1131. </valid>
  1132. </testCase>
  1133. <testCase>
  1134. <section>4.2</section>
  1135. <correct>
  1136. <element xmlns="http://relaxng.org/ns/structure/1.0">
  1137. <name>&#xA;&#xD;&#x20;&#x9;foo&#xA;&#xD;&#x20;&#x9;</name>
  1138. <attribute><name>&#xA;&#xD;&#x20;&#x9;bar&#xA;&#xD;&#x20;&#x9;</name></attribute>
  1139. </element>
  1140. </correct>
  1141. <valid>
  1142. <foo bar=""/>
  1143. </valid>
  1144. </testCase>
  1145. <testCase>
  1146. <section>4.2</section>
  1147. <correct>
  1148. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1149. <start combine="&#xA;&#xD;&#x20;&#x9;choice&#xA;&#xD;&#x20;&#x9;">
  1150. <ref name="&#xA;&#xD;&#x20;&#x9;x&#xA;&#xD;&#x20;&#x9;"/>
  1151. </start>
  1152. <define name="x">
  1153. <ref name="y"/>
  1154. </define>
  1155. <define name="&#xA;&#xD;&#x20;&#x9;y&#xA;&#xD;&#x20;&#x9;">
  1156. <grammar>
  1157. <start combine="&#xA;&#xD;&#x20;&#x9;interleave&#xA;&#xD;&#x20;&#x9;">
  1158. <parentRef name="&#xA;&#xD;&#x20;&#x9;z&#xA;&#xD;&#x20;&#x9;"/>
  1159. </start>
  1160. </grammar>
  1161. </define>
  1162. <define name="z">
  1163. <element name="foo">
  1164. <empty/>
  1165. </element>
  1166. </define>
  1167. </grammar>
  1168. </correct>
  1169. <valid>
  1170. <foo/>
  1171. </valid>
  1172. </testCase>
  1173. </testSuite>
  1174. <testCase>
  1175. <section>4.4</section>
  1176. <correct>
  1177. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  1178. <value datatypeLibrary="http://www.example.com/this-does-not-exist">bar</value>
  1179. </element>
  1180. </correct>
  1181. <valid>
  1182. <foo>bar</foo>
  1183. </valid>
  1184. <valid>
  1185. <foo>
  1186. bar
  1187. </foo>
  1188. </valid>
  1189. <valid>
  1190. <foo> bar </foo>
  1191. </valid>
  1192. <invalid>
  1193. <foo>baz</foo>
  1194. </invalid>
  1195. <invalid>
  1196. <foo>ba r</foo>
  1197. </invalid>
  1198. </testCase>
  1199. <testSuite>
  1200. <section>4.5</section>
  1201. <testCase>
  1202. <section>4.5</section>
  1203. <dir name="sub">
  1204. <resource name="x">
  1205. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  1206. <empty/>
  1207. </element>
  1208. </resource>
  1209. </dir>
  1210. <correct>
  1211. <externalRef xmlns="http://relaxng.org/ns/structure/1.0"
  1212. xml:base="sub/y" href="x"/>
  1213. </correct>
  1214. <valid>
  1215. <foo/>
  1216. </valid>
  1217. <invalid>
  1218. <bar/>
  1219. </invalid>
  1220. </testCase>
  1221. <testCase>
  1222. <section>4.5</section>
  1223. <resource name="x">
  1224. <element xmlns="http://relaxng.org/ns/structure/1.0" name="bar">
  1225. <empty/>
  1226. </element>
  1227. </resource>
  1228. <dir name="sub1">
  1229. <resource name="x">
  1230. <element xmlns="http://relaxng.org/ns/structure/1.0" name="bar">
  1231. <empty/>
  1232. </element>
  1233. </resource>
  1234. <dir name="sub3">
  1235. <resource name="x">
  1236. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  1237. <empty/>
  1238. </element>
  1239. </resource>
  1240. </dir>
  1241. </dir>
  1242. <correct>
  1243. <group xmlns="http://relaxng.org/ns/structure/1.0" xml:base="sub1/">
  1244. <group>
  1245. <group xml:base="sub2">
  1246. <group>
  1247. <group xml:base="sub3/y">
  1248. <externalRef href="x"/>
  1249. </group>
  1250. </group>
  1251. </group>
  1252. </group>
  1253. </group>
  1254. </correct>
  1255. <valid>
  1256. <foo/>
  1257. </valid>
  1258. <invalid>
  1259. <bar/>
  1260. </invalid>
  1261. </testCase>
  1262. <testCase>
  1263. <section>4.5</section>
  1264. <resource name="x">
  1265. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  1266. <empty/>
  1267. </element>
  1268. </resource>
  1269. <incorrect>
  1270. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x#foo"/>
  1271. </incorrect>
  1272. </testCase>
  1273. </testSuite>
  1274. <testSuite>
  1275. <section>4.6</section>
  1276. <testCase>
  1277. <section>4.6</section>
  1278. <resource name="x">
  1279. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  1280. <empty/>
  1281. </element>
  1282. </resource>
  1283. <correct>
  1284. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>
  1285. </correct>
  1286. <valid>
  1287. <foo/>
  1288. </valid>
  1289. <invalid>
  1290. <bar/>
  1291. </invalid>
  1292. </testCase>
  1293. <testCase>
  1294. <section>4.6</section>
  1295. <resource name="x">
  1296. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  1297. <empty/>
  1298. </element>
  1299. </resource>
  1300. <correct>
  1301. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x" ns="http://www.example.com"/>
  1302. </correct>
  1303. <valid>
  1304. <foo xmlns="http://www.example.com"/>
  1305. </valid>
  1306. <invalid>
  1307. <foo/>
  1308. </invalid>
  1309. </testCase>
  1310. <testCase>
  1311. <section>4.6</section>
  1312. <resource name="x">
  1313. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>
  1314. </resource>
  1315. <incorrect>
  1316. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>
  1317. </incorrect>
  1318. </testCase>
  1319. <testCase>
  1320. <section>4.6</section>
  1321. <resource name="x">
  1322. <start xmlns="http://relaxng.org/ns/structure/1.0">
  1323. <element name="foo">
  1324. <empty/>
  1325. </element>
  1326. </start>
  1327. </resource>
  1328. <incorrect>
  1329. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>
  1330. </incorrect>
  1331. </testCase>
  1332. <testCase>
  1333. <section>4.6</section>
  1334. <resource name="x">
  1335. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="y"/>
  1336. </resource>
  1337. <resource name="y">
  1338. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>
  1339. </resource>
  1340. <incorrect>
  1341. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>
  1342. </incorrect>
  1343. </testCase>
  1344. <testCase>
  1345. <section>4.6</section>
  1346. <documentation>Same value of href before resolution, but not a loop.</documentation>
  1347. <dir name="sub">
  1348. <resource name="x">
  1349. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="sub/x"/>
  1350. </resource>
  1351. <dir name="sub">
  1352. <resource name="x">
  1353. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  1354. <empty/>
  1355. </element>
  1356. </resource>
  1357. </dir>
  1358. </dir>
  1359. <correct>
  1360. <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="sub/x"/>
  1361. </correct>
  1362. <valid>
  1363. <foo/>
  1364. </valid>
  1365. <invalid>
  1366. <bar/>
  1367. </invalid>
  1368. </testCase>
  1369. </testSuite>
  1370. <testSuite>
  1371. <section>4.7</section>
  1372. <testCase>
  1373. <section>4.7</section>
  1374. <resource name="x">
  1375. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1376. <start>
  1377. <element name="foo">
  1378. <empty/>
  1379. </element>
  1380. </start>
  1381. </grammar>
  1382. </resource>
  1383. <correct>
  1384. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1385. <include href="x"/>
  1386. </grammar>
  1387. </correct>
  1388. <valid>
  1389. <foo/>
  1390. </valid>
  1391. <invalid>
  1392. <bar/>
  1393. </invalid>
  1394. </testCase>
  1395. <testCase>
  1396. <section>4.7</section>
  1397. <resource name="x">
  1398. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1399. <start>
  1400. <element name="foo">
  1401. <empty/>
  1402. </element>
  1403. </start>
  1404. </grammar>
  1405. </resource>
  1406. <correct>
  1407. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1408. <include href="x" ns="http://www.example.com"/>
  1409. </grammar>
  1410. </correct>
  1411. <valid>
  1412. <foo xmlns="http://www.example.com"/>
  1413. </valid>
  1414. <invalid>
  1415. <foo/>
  1416. </invalid>
  1417. </testCase>
  1418. <testCase>
  1419. <section>4.7</section>
  1420. <resource name="x">
  1421. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1422. <include href="y"/>
  1423. </grammar>
  1424. </resource>
  1425. <resource name="y">
  1426. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1427. <start>
  1428. <element name="foo">
  1429. <empty/>
  1430. </element>
  1431. </start>
  1432. </grammar>
  1433. </resource>
  1434. <correct>
  1435. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1436. <include href="x"/>
  1437. </grammar>
  1438. </correct>
  1439. <valid>
  1440. <foo/>
  1441. </valid>
  1442. <invalid>
  1443. <bar/>
  1444. </invalid>
  1445. </testCase>
  1446. <testCase>
  1447. <section>4.7</section>
  1448. <resource name="x">
  1449. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  1450. <empty/>
  1451. </element>
  1452. </resource>
  1453. <incorrect>
  1454. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1455. <include href="x"/>
  1456. </grammar>
  1457. </incorrect>
  1458. </testCase>
  1459. <testCase>
  1460. <section>4.7</section>
  1461. <resource name="x">
  1462. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1463. <include href="x"/>
  1464. </grammar>
  1465. </resource>
  1466. <incorrect>
  1467. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1468. <include href="x"/>
  1469. </grammar>
  1470. </incorrect>
  1471. </testCase>
  1472. <testCase>
  1473. <section>4.7</section>
  1474. <resource name="x">
  1475. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1476. <include href="y"/>
  1477. </grammar>
  1478. </resource>
  1479. <resource name="y">
  1480. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1481. <include href="x"/>
  1482. </grammar>
  1483. </resource>
  1484. <incorrect>
  1485. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1486. <include href="x"/>
  1487. </grammar>
  1488. </incorrect>
  1489. </testCase>
  1490. <testCase>
  1491. <section>4.7</section>
  1492. <dir name="sub">
  1493. <resource name="x">
  1494. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1495. <include href="sub/x"/>
  1496. </grammar>
  1497. </resource>
  1498. <dir name="sub">
  1499. <resource name="x">
  1500. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1501. <start>
  1502. <element name="foo">
  1503. <empty/>
  1504. </element>
  1505. </start>
  1506. </grammar>
  1507. </resource>
  1508. </dir>
  1509. </dir>
  1510. <correct>
  1511. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1512. <include href="sub/x"/>
  1513. </grammar>
  1514. </correct>
  1515. <valid>
  1516. <foo/>
  1517. </valid>
  1518. <invalid>
  1519. <bar/>
  1520. </invalid>
  1521. </testCase>
  1522. <testCase>
  1523. <section>4.7</section>
  1524. <resource name="x">
  1525. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1526. <define name="foo">
  1527. <element name="foo">
  1528. <empty/>
  1529. </element>
  1530. </define>
  1531. </grammar>
  1532. </resource>
  1533. <incorrect>
  1534. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1535. <include href="x">
  1536. <start>
  1537. <ref name="foo"/>
  1538. </start>
  1539. </include>
  1540. </grammar>
  1541. </incorrect>
  1542. </testCase>
  1543. <testCase>
  1544. <section>4.7</section>
  1545. <resource name="x">
  1546. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1547. <define name="foo">
  1548. <element name="foo">
  1549. <empty/>
  1550. </element>
  1551. </define>
  1552. </grammar>
  1553. </resource>
  1554. <correct>
  1555. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1556. <include href="x"/>
  1557. <start>
  1558. <ref name="foo"/>
  1559. </start>
  1560. </grammar>
  1561. </correct>
  1562. <valid><foo/></valid>
  1563. <invalid><bar/></invalid>
  1564. </testCase>
  1565. <testCase>
  1566. <section>4.7</section>
  1567. <resource name="x">
  1568. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1569. <start>
  1570. <ref name="foo"/>
  1571. </start>
  1572. </grammar>
  1573. </resource>
  1574. <incorrect>
  1575. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1576. <include href="x">
  1577. <define name="foo">
  1578. <element name="foo">
  1579. <empty/>
  1580. </element>
  1581. </define>
  1582. </include>
  1583. </grammar>
  1584. </incorrect>
  1585. </testCase>
  1586. <testCase>
  1587. <section>4.7</section>
  1588. <resource name="x">
  1589. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1590. <start>
  1591. <ref name="foo"/>
  1592. </start>
  1593. </grammar>
  1594. </resource>
  1595. <correct>
  1596. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1597. <include href="x"/>
  1598. <define name="foo">
  1599. <element name="foo">
  1600. <empty/>
  1601. </element>
  1602. </define>
  1603. </grammar>
  1604. </correct>
  1605. <valid><foo/></valid>
  1606. <invalid><bar/></invalid>
  1607. </testCase>
  1608. <testCase>
  1609. <section>4.7</section>
  1610. <resource name="x">
  1611. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1612. <define name="foo" combine="choice">
  1613. <element name="foo3">
  1614. <empty/>
  1615. </element>
  1616. </define>
  1617. </grammar>
  1618. </resource>
  1619. <correct>
  1620. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1621. <start>
  1622. <ref name="foo"/>
  1623. </start>
  1624. <include href="x">
  1625. <define name="foo" combine="choice">
  1626. <element name="foo1">
  1627. <empty/>
  1628. </element>
  1629. </define>
  1630. </include>
  1631. <define name="foo">
  1632. <element name="foo2">
  1633. <empty/>
  1634. </element>
  1635. </define>
  1636. </grammar>
  1637. </correct>
  1638. <valid><foo1/></valid>
  1639. <valid><foo2/></valid>
  1640. <invalid><foo3/></invalid>
  1641. </testCase>
  1642. <testCase>
  1643. <section>4.7</section>
  1644. <resource name="level1.rng">
  1645. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1646. <include href="level2.rng">
  1647. <define name="foo">
  1648. <element name="bar">
  1649. <empty/>
  1650. </element>
  1651. </define>
  1652. </include>
  1653. </grammar>
  1654. </resource>
  1655. <resource name="level2.rng">
  1656. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1657. <define name="bar">
  1658. <element name="bar">
  1659. <empty/>
  1660. </element>
  1661. </define>
  1662. </grammar>
  1663. </resource>
  1664. <incorrect>
  1665. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1666. <start>
  1667. <ref name="foo"/>
  1668. </start>
  1669. <include href="level1.rng">
  1670. <define name="foo">
  1671. <element name="foo">
  1672. <empty/>
  1673. </element>
  1674. </define>
  1675. </include>
  1676. </grammar>
  1677. </incorrect>
  1678. </testCase>
  1679. </testSuite>
  1680. <testSuite>
  1681. <section>4.8</section>
  1682. <testCase>
  1683. <section>4.8</section>
  1684. <correct>
  1685. <element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.example.com" name="foo">
  1686. <attribute name="bar" ns="http://www.example.com"/>
  1687. </element>
  1688. </correct>
  1689. <valid>
  1690. <eg:foo eg:bar="x" xmlns:eg="http://www.example.com"/>
  1691. </valid>
  1692. <invalid>
  1693. <eg:foo xmlns:eg="http://www.example.com" bar="x"/>
  1694. </invalid>
  1695. </testCase>
  1696. <testCase>
  1697. <section>4.8</section>
  1698. <correct>
  1699. <element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.example.com" name="foo">
  1700. <attribute name="bar"/>
  1701. </element>
  1702. </correct>
  1703. <invalid>
  1704. <eg:foo xmlns:eg="http://www.example.com" eg:bar="x"/>
  1705. </invalid>
  1706. <valid>
  1707. <eg:foo xmlns:eg="http://www.example.com" bar="x"/>
  1708. </valid>
  1709. </testCase>
  1710. </testSuite>
  1711. <testSuite>
  1712. <section>4.9</section>
  1713. <testCase>
  1714. <section>4.9</section>
  1715. <correct>
  1716. <element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.example.com" name="foo">
  1717. <attribute>
  1718. <name>bar</name>
  1719. </attribute>
  1720. </element>
  1721. </correct>
  1722. <valid>
  1723. <eg:foo xmlns:eg="http://www.example.com" eg:bar="x"/>
  1724. </valid>
  1725. <invalid>
  1726. <eg:foo xmlns:eg="http://www.example.com" bar="x"/>
  1727. </invalid>
  1728. </testCase>
  1729. <testCase>
  1730. <section>4.6</section>
  1731. <section>4.9</section>
  1732. <resource name="x">
  1733. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  1734. <empty/>
  1735. </element>
  1736. </resource>
  1737. <correct>
  1738. <group ns="http://www.example.com" xmlns="http://relaxng.org/ns/structure/1.0" >
  1739. <externalRef href="x"/>
  1740. </group>
  1741. </correct>
  1742. <valid>
  1743. <foo xmlns="http://www.example.com"/>
  1744. </valid>
  1745. <invalid>
  1746. <foo/>
  1747. </invalid>
  1748. </testCase>
  1749. <testCase>
  1750. <correct>
  1751. <group xmlns="http://relaxng.org/ns/structure/1.0">
  1752. <element ns="http://www.example.com">
  1753. <name>foo</name>
  1754. <empty/>
  1755. </element>
  1756. </group>
  1757. </correct>
  1758. <valid><foo xmlns="http://www.example.com"/></valid>
  1759. <invalid><foo/></invalid>
  1760. </testCase>
  1761. <testCase>
  1762. <correct>
  1763. <element ns="http://www.example.com" xmlns="http://relaxng.org/ns/structure/1.0">
  1764. <name>foo</name>
  1765. <empty/>
  1766. </element>
  1767. </correct>
  1768. <valid><foo xmlns="http://www.example.com"/></valid>
  1769. <invalid><foo/></invalid>
  1770. </testCase>
  1771. <testCase>
  1772. <correct>
  1773. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  1774. <attribute ns="http://www.example.com">
  1775. <name>bar</name>
  1776. <text/>
  1777. </attribute>
  1778. </element>
  1779. </correct>
  1780. <valid><foo xmlns:x="http://www.example.com" x:bar="whatever"/></valid>
  1781. <invalid><foo bar="whatever"/></invalid>
  1782. </testCase>
  1783. </testSuite>
  1784. <testSuite>
  1785. <section>4.10</section>
  1786. <testCase>
  1787. <section>4.10</section>
  1788. <incorrect>
  1789. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo:bar">
  1790. <empty/>
  1791. </element>
  1792. </incorrect>
  1793. </testCase>
  1794. <testCase>
  1795. <section>4.10</section>
  1796. <correct>
  1797. <element xmlns="http://relaxng.org/ns/structure/1.0" name="eg:foo" xmlns:eg="http://www.example.com">
  1798. <empty/>
  1799. </element>
  1800. </correct>
  1801. <valid>
  1802. <foo xmlns="http://www.example.com"/>
  1803. </valid>
  1804. <invalid>
  1805. <foo xmlns="http://www.example.com/"/>
  1806. </invalid>
  1807. </testCase>
  1808. <testCase>
  1809. <section>4.10</section>
  1810. <correct>
  1811. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo" xmlns:eg="http://www.example.com">
  1812. <attribute name="eg:bar"/>
  1813. </element>
  1814. </correct>
  1815. <valid>
  1816. <foo xmlns:ex="http://www.example.com" ex:bar="x"/>
  1817. </valid>
  1818. <invalid>
  1819. <foo xmlns:ex="http://www.example.com/" ex:bar="x"/>
  1820. </invalid>
  1821. </testCase>
  1822. <testCase>
  1823. <section>4.10</section>
  1824. <correct>
  1825. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  1826. <attribute name="xml:lang"/>
  1827. </element>
  1828. </correct>
  1829. <valid>
  1830. <foo xml:lang="en"/>
  1831. </valid>
  1832. <invalid>
  1833. <foo lang="en"/>
  1834. </invalid>
  1835. </testCase>
  1836. </testSuite>
  1837. <testSuite>
  1838. <section>4.11</section>
  1839. <testCase>
  1840. <section>4.11</section>
  1841. <correct>
  1842. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1843. <div ns="http://www.example.com">
  1844. <div>
  1845. <start>
  1846. <ref name="foo"/>
  1847. </start>
  1848. </div>
  1849. <define name="foo">
  1850. <element name="foo">
  1851. <empty/>
  1852. </element>
  1853. </define>
  1854. </div>
  1855. <div/>
  1856. </grammar>
  1857. </correct>
  1858. <valid>
  1859. <foo xmlns="http://www.example.com"/>
  1860. </valid>
  1861. <invalid>
  1862. <foo/>
  1863. </invalid>
  1864. </testCase>
  1865. </testSuite>
  1866. <testSuite>
  1867. <testCase>
  1868. <section>4.12</section>
  1869. <correct>
  1870. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  1871. <start>
  1872. <element name="foo">
  1873. <ref name="bars"/>
  1874. </element>
  1875. </start>
  1876. <define name="bars">
  1877. <element name="bar">
  1878. <empty/>
  1879. </element>
  1880. <element name="bar">
  1881. <empty/>
  1882. </element>
  1883. <element name="bar">
  1884. <empty/>
  1885. </element>
  1886. </define>
  1887. </grammar>
  1888. </correct>
  1889. <valid>
  1890. <foo><bar/><bar/><bar/></foo>
  1891. </valid>
  1892. <invalid>
  1893. <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>
  1894. </invalid>
  1895. <invalid>
  1896. <foo><bar/><bar/></foo>
  1897. </invalid>
  1898. <invalid>
  1899. <foo><bar/></foo>
  1900. </invalid>
  1901. <invalid>
  1902. <foo></foo>
  1903. </invalid>
  1904. <invalid>
  1905. <foo>X</foo>
  1906. </invalid>
  1907. <invalid>
  1908. <foo><bar/>X<bar/><bar/></foo>
  1909. </invalid>
  1910. <invalid>
  1911. <foo><bar/><bar/><bar/><bar/></foo>
  1912. </invalid>
  1913. </testCase>
  1914. <testCase>
  1915. <section>4.12</section>
  1916. <correct>
  1917. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  1918. <oneOrMore>
  1919. <element name="bar">
  1920. <empty/>
  1921. </element>
  1922. <element name="bar">
  1923. <empty/>
  1924. </element>
  1925. <element name="bar">
  1926. <empty/>
  1927. </element>
  1928. </oneOrMore>
  1929. </element>
  1930. </correct>
  1931. <valid>
  1932. <foo><bar/><bar/><bar/></foo>
  1933. </valid>
  1934. <valid>
  1935. <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>
  1936. </valid>
  1937. <invalid>
  1938. <foo><bar/><bar/></foo>
  1939. </invalid>
  1940. <invalid>
  1941. <foo><bar/></foo>
  1942. </invalid>
  1943. <invalid>
  1944. <foo></foo>
  1945. </invalid>
  1946. <invalid>
  1947. <foo>X</foo>
  1948. </invalid>
  1949. <invalid>
  1950. <foo><bar/>X<bar/><bar/></foo>
  1951. </invalid>
  1952. <invalid>
  1953. <foo><bar/><bar/><bar/><bar/></foo>
  1954. </invalid>
  1955. </testCase>
  1956. <testCase>
  1957. <section>4.12</section>
  1958. <section>4.15</section>
  1959. <correct>
  1960. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  1961. <zeroOrMore>
  1962. <element name="bar">
  1963. <empty/>
  1964. </element>
  1965. <element name="bar">
  1966. <empty/>
  1967. </element>
  1968. <element name="bar">
  1969. <empty/>
  1970. </element>
  1971. </zeroOrMore>
  1972. </element>
  1973. </correct>
  1974. <valid>
  1975. <foo><bar/><bar/><bar/></foo>
  1976. </valid>
  1977. <valid>
  1978. <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>
  1979. </valid>
  1980. <invalid>
  1981. <foo><bar/><bar/></foo>
  1982. </invalid>
  1983. <invalid>
  1984. <foo><bar/></foo>
  1985. </invalid>
  1986. <valid>
  1987. <foo></foo>
  1988. </valid>
  1989. <invalid>
  1990. <foo>X</foo>
  1991. </invalid>
  1992. <invalid>
  1993. <foo><bar/>X<bar/><bar/></foo>
  1994. </invalid>
  1995. <invalid>
  1996. <foo><bar/><bar/><bar/><bar/></foo>
  1997. </invalid>
  1998. </testCase>
  1999. <testCase>
  2000. <section>4.12</section>
  2001. <section>4.14</section>
  2002. <correct>
  2003. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2004. <optional>
  2005. <element name="bar">
  2006. <empty/>
  2007. </element>
  2008. <element name="bar">
  2009. <empty/>
  2010. </element>
  2011. <element name="bar">
  2012. <empty/>
  2013. </element>
  2014. </optional>
  2015. </element>
  2016. </correct>
  2017. <valid>
  2018. <foo><bar/><bar/><bar/></foo>
  2019. </valid>
  2020. <invalid>
  2021. <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>
  2022. </invalid>
  2023. <invalid>
  2024. <foo><bar/><bar/></foo>
  2025. </invalid>
  2026. <invalid>
  2027. <foo><bar/></foo>
  2028. </invalid>
  2029. <valid>
  2030. <foo></foo>
  2031. </valid>
  2032. <invalid>
  2033. <foo>X</foo>
  2034. </invalid>
  2035. <invalid>
  2036. <foo><bar/>X<bar/><bar/></foo>
  2037. </invalid>
  2038. <invalid>
  2039. <foo><bar/><bar/><bar/><bar/></foo>
  2040. </invalid>
  2041. </testCase>
  2042. <testCase>
  2043. <section>4.12</section>
  2044. <correct>
  2045. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2046. <list>
  2047. <value>x</value>
  2048. <value>y</value>
  2049. <value>z</value>
  2050. </list>
  2051. </element>
  2052. </correct>
  2053. <valid>
  2054. <foo>x y z</foo>
  2055. </valid>
  2056. <invalid>
  2057. <foo>x</foo>
  2058. </invalid>
  2059. </testCase>
  2060. <testCase>
  2061. <section>4.12</section>
  2062. <section>4.13</section>
  2063. <correct>
  2064. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2065. <mixed>
  2066. <element name="bar">
  2067. <empty/>
  2068. </element>
  2069. <element name="bar">
  2070. <empty/>
  2071. </element>
  2072. <element name="bar">
  2073. <empty/>
  2074. </element>
  2075. </mixed>
  2076. </element>
  2077. </correct>
  2078. <valid>
  2079. <foo><bar/><bar/><bar/></foo>
  2080. </valid>
  2081. <invalid>
  2082. <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>
  2083. </invalid>
  2084. <invalid>
  2085. <foo><bar/><bar/></foo>
  2086. </invalid>
  2087. <invalid>
  2088. <foo><bar/></foo>
  2089. </invalid>
  2090. <invalid>
  2091. <foo></foo>
  2092. </invalid>
  2093. <valid>
  2094. <foo><bar/>X<bar/><bar/></foo>
  2095. </valid>
  2096. <invalid>
  2097. <foo>X</foo>
  2098. </invalid>
  2099. <invalid>
  2100. <foo><bar/><bar/><bar/><bar/></foo>
  2101. </invalid>
  2102. </testCase>
  2103. <testCase>
  2104. <section>4.12</section>
  2105. <correct>
  2106. <element xmlns="http://relaxng.org/ns/structure/1.0">
  2107. <name>foo</name>
  2108. <element name="bar">
  2109. <empty/>
  2110. </element>
  2111. <element name="bar">
  2112. <empty/>
  2113. </element>
  2114. <element name="bar">
  2115. <empty/>
  2116. </element>
  2117. </element>
  2118. </correct>
  2119. <valid>
  2120. <foo><bar/><bar/><bar/></foo>
  2121. </valid>
  2122. <invalid>
  2123. <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>
  2124. </invalid>
  2125. <invalid>
  2126. <foo><bar/><bar/></foo>
  2127. </invalid>
  2128. <invalid>
  2129. <foo><bar/></foo>
  2130. </invalid>
  2131. <invalid>
  2132. <foo></foo>
  2133. </invalid>
  2134. <invalid>
  2135. <foo>X</foo>
  2136. </invalid>
  2137. <invalid>
  2138. <foo><bar/>X<bar/><bar/></foo>
  2139. </invalid>
  2140. <invalid>
  2141. <foo><bar/><bar/><bar/><bar/></foo>
  2142. </invalid>
  2143. </testCase>
  2144. <testCase>
  2145. <section>4.12</section>
  2146. <correct>
  2147. <element xmlns="http://relaxng.org/ns/structure/1.0">
  2148. <anyName>
  2149. <except>
  2150. <name>foo</name>
  2151. <name>bar</name>
  2152. <name>baz</name>
  2153. </except>
  2154. </anyName>
  2155. <empty/>
  2156. </element>
  2157. </correct>
  2158. <valid><xyzzy/></valid>
  2159. <invalid><foo/></invalid>
  2160. <invalid><bar/></invalid>
  2161. <invalid><baz/></invalid>
  2162. </testCase>
  2163. <testCase>
  2164. <section>4.12</section>
  2165. <correct>
  2166. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2167. <data type="token">
  2168. <except>
  2169. <value>x</value>
  2170. <value>y</value>
  2171. <value>z</value>
  2172. </except>
  2173. </data>
  2174. </element>
  2175. </correct>
  2176. <valid><foo/></valid>
  2177. <valid><foo>xyz</foo></valid>
  2178. <invalid><foo>x</foo></invalid>
  2179. <invalid><foo>y</foo></invalid>
  2180. <invalid><foo>y</foo></invalid>
  2181. </testCase>
  2182. <testCase>
  2183. <section>4.12</section>
  2184. <correct>
  2185. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2186. <attribute name="bar"/>
  2187. </element>
  2188. </correct>
  2189. <valid>
  2190. <foo bar=""/>
  2191. </valid>
  2192. <valid>
  2193. <foo bar="x"/>
  2194. </valid>
  2195. <invalid>
  2196. <foo/>
  2197. </invalid>
  2198. </testCase>
  2199. <testCase>
  2200. <section>4.12</section>
  2201. <correct>
  2202. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2203. <attribute>
  2204. <name>bar</name>
  2205. </attribute>
  2206. </element>
  2207. </correct>
  2208. <valid>
  2209. <foo bar=""/>
  2210. </valid>
  2211. <valid>
  2212. <foo bar="x"/>
  2213. </valid>
  2214. <invalid>
  2215. <foo/>
  2216. </invalid>
  2217. </testCase>
  2218. <testCase>
  2219. <section>4.12</section>
  2220. <correct>
  2221. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2222. <group>
  2223. <element name="bar">
  2224. <empty/>
  2225. </element>
  2226. <element name="bar">
  2227. <empty/>
  2228. </element>
  2229. <element name="bar">
  2230. <empty/>
  2231. </element>
  2232. </group>
  2233. </element>
  2234. </correct>
  2235. <valid>
  2236. <foo><bar/><bar/><bar/></foo>
  2237. </valid>
  2238. <invalid>
  2239. <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>
  2240. </invalid>
  2241. <invalid>
  2242. <foo><bar/><bar/></foo>
  2243. </invalid>
  2244. <invalid>
  2245. <foo><bar/></foo>
  2246. </invalid>
  2247. <invalid>
  2248. <foo></foo>
  2249. </invalid>
  2250. <invalid>
  2251. <foo>X</foo>
  2252. </invalid>
  2253. <invalid>
  2254. <foo><bar/>X<bar/><bar/></foo>
  2255. </invalid>
  2256. <invalid>
  2257. <foo><bar/><bar/><bar/><bar/></foo>
  2258. </invalid>
  2259. </testCase>
  2260. <testCase>
  2261. <section>4.12</section>
  2262. <correct>
  2263. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2264. <choice>
  2265. <element name="bar1">
  2266. <empty/>
  2267. </element>
  2268. <element name="bar2">
  2269. <empty/>
  2270. </element>
  2271. <element name="bar3">
  2272. <empty/>
  2273. </element>
  2274. </choice>
  2275. </element>
  2276. </correct>
  2277. <valid><foo><bar1/></foo></valid>
  2278. <valid><foo><bar2/></foo></valid>
  2279. <valid><foo><bar3/></foo></valid>
  2280. <invalid><foo/></invalid>
  2281. </testCase>
  2282. <testCase>
  2283. <section>4.12</section>
  2284. <correct>
  2285. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2286. <interleave>
  2287. <element name="bar1">
  2288. <empty/>
  2289. </element>
  2290. <element name="bar2">
  2291. <empty/>
  2292. </element>
  2293. <element name="bar3">
  2294. <empty/>
  2295. </element>
  2296. </interleave>
  2297. </element>
  2298. </correct>
  2299. <valid><foo><bar1/><bar2/><bar3/></foo></valid>
  2300. <valid><foo><bar1/><bar3/><bar2/></foo></valid>
  2301. <valid><foo><bar2/><bar1/><bar3/></foo></valid>
  2302. <valid><foo><bar2/><bar3/><bar1/></foo></valid>
  2303. <valid><foo><bar3/><bar1/><bar2/></foo></valid>
  2304. <valid><foo><bar3/><bar2/><bar1/></foo></valid>
  2305. <invalid><foo><bar2/><bar1/></foo></invalid>
  2306. <invalid><foo><bar1/><bar3/><bar2/><bar1/></foo></invalid>
  2307. </testCase>
  2308. <testCase>
  2309. <section>4.12</section>
  2310. <correct>
  2311. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2312. <group>
  2313. <element name="bar">
  2314. <empty/>
  2315. </element>
  2316. </group>
  2317. </element>
  2318. </correct>
  2319. <valid><foo><bar/></foo></valid>
  2320. <invalid><foo/></invalid>
  2321. </testCase>
  2322. <testCase>
  2323. <section>4.12</section>
  2324. <correct>
  2325. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2326. <interleave>
  2327. <element name="bar">
  2328. <empty/>
  2329. </element>
  2330. </interleave>
  2331. </element>
  2332. </correct>
  2333. <valid><foo><bar/></foo></valid>
  2334. <invalid><foo/></invalid>
  2335. </testCase>
  2336. <testCase>
  2337. <section>4.12</section>
  2338. <correct>
  2339. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2340. <choice>
  2341. <element name="bar">
  2342. <empty/>
  2343. </element>
  2344. </choice>
  2345. </element>
  2346. </correct>
  2347. <valid><foo><bar/></foo></valid>
  2348. <invalid><foo/></invalid>
  2349. </testCase>
  2350. </testSuite>
  2351. <testSuite>
  2352. <section>4.13</section>
  2353. <testCase>
  2354. <section>4.13</section>
  2355. <correct>
  2356. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2357. <mixed>
  2358. <element name="bar">
  2359. <empty/>
  2360. </element>
  2361. </mixed>
  2362. </element>
  2363. </correct>
  2364. <valid><foo>x<bar/></foo></valid>
  2365. <valid><foo><bar/></foo></valid>
  2366. <valid><foo><bar/>x</foo></valid>
  2367. <valid><foo>x<bar/>y</foo></valid>
  2368. <invalid><foo/></invalid>
  2369. <invalid><foo><bar/><bar/></foo></invalid>
  2370. </testCase>
  2371. </testSuite>
  2372. <testSuite>
  2373. <section>4.14</section>
  2374. <testCase>
  2375. <section>4.14</section>
  2376. <correct>
  2377. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2378. <optional>
  2379. <element name="bar">
  2380. <empty/>
  2381. </element>
  2382. </optional>
  2383. </element>
  2384. </correct>
  2385. <valid><foo><bar/></foo></valid>
  2386. <valid><foo/></valid>
  2387. <invalid><foo>x<bar/></foo></invalid>
  2388. <invalid><foo><bar/><bar/></foo></invalid>
  2389. </testCase>
  2390. </testSuite>
  2391. <testSuite>
  2392. <section>4.15</section>
  2393. <testCase>
  2394. <section>4.15</section>
  2395. <correct>
  2396. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2397. <zeroOrMore>
  2398. <element name="bar">
  2399. <empty/>
  2400. </element>
  2401. </zeroOrMore>
  2402. </element>
  2403. </correct>
  2404. <valid><foo><bar/></foo></valid>
  2405. <valid><foo/></valid>
  2406. <invalid><foo>x<bar/></foo></invalid>
  2407. <invalid><foo><baz/></foo></invalid>
  2408. <valid><foo><bar/><bar/></foo></valid>
  2409. </testCase>
  2410. </testSuite>
  2411. <testSuite>
  2412. <section>4.16</section>
  2413. <testCase>
  2414. <section>4.16</section>
  2415. <incorrect>
  2416. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2417. <start>
  2418. <element>
  2419. <anyName>
  2420. <except>
  2421. <anyName/>
  2422. </except>
  2423. </anyName>
  2424. <empty/>
  2425. </element>
  2426. </start>
  2427. </grammar>
  2428. </incorrect>
  2429. </testCase>
  2430. <testCase>
  2431. <section>4.16</section>
  2432. <incorrect>
  2433. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2434. <start>
  2435. <element>
  2436. <anyName>
  2437. <except>
  2438. <choice>
  2439. <anyName/>
  2440. <name>foo</name>
  2441. </choice>
  2442. </except>
  2443. </anyName>
  2444. <empty/>
  2445. </element>
  2446. </start>
  2447. </grammar>
  2448. </incorrect>
  2449. </testCase>
  2450. <testCase>
  2451. <section>4.16</section>
  2452. <incorrect>
  2453. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2454. <start>
  2455. <element>
  2456. <nsName ns="">
  2457. <except>
  2458. <nsName ns=""/>
  2459. </except>
  2460. </nsName>
  2461. <empty/>
  2462. </element>
  2463. </start>
  2464. </grammar>
  2465. </incorrect>
  2466. </testCase>
  2467. <testCase>
  2468. <section>4.16</section>
  2469. <incorrect>
  2470. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2471. <start>
  2472. <element>
  2473. <nsName ns="">
  2474. <except>
  2475. <choice>
  2476. <nsName ns=""/>
  2477. <name>foo</name>
  2478. </choice>
  2479. </except>
  2480. </nsName>
  2481. <empty/>
  2482. </element>
  2483. </start>
  2484. </grammar>
  2485. </incorrect>
  2486. </testCase>
  2487. <testCase>
  2488. <section>4.16</section>
  2489. <incorrect>
  2490. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2491. <start>
  2492. <element>
  2493. <nsName ns="">
  2494. <except>
  2495. <anyName/>
  2496. </except>
  2497. </nsName>
  2498. <empty/>
  2499. </element>
  2500. </start>
  2501. </grammar>
  2502. </incorrect>
  2503. </testCase>
  2504. <testCase>
  2505. <section>4.16</section>
  2506. <incorrect>
  2507. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2508. <start>
  2509. <element>
  2510. <nsName ns="">
  2511. <except>
  2512. <choice>
  2513. <anyName/>
  2514. <name>foo</name>
  2515. </choice>
  2516. </except>
  2517. </nsName>
  2518. <empty/>
  2519. </element>
  2520. </start>
  2521. </grammar>
  2522. </incorrect>
  2523. </testCase>
  2524. <testCase>
  2525. <section>4.16</section>
  2526. <documentation>Tests that 4.16 is before 4.20.</documentation>
  2527. <incorrect>
  2528. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2529. <start>
  2530. <element name="foo">
  2531. <zeroOrMore>
  2532. <attribute>
  2533. <anyName>
  2534. <except>
  2535. <anyName/>
  2536. </except>
  2537. </anyName>
  2538. <text/>
  2539. </attribute>
  2540. <notAllowed/>
  2541. </zeroOrMore>
  2542. </element>
  2543. </start>
  2544. </grammar>
  2545. </incorrect>
  2546. </testCase>
  2547. <testCase>
  2548. <section>4.16</section>
  2549. <documentation>Tests that 4.16 is before removal of unreachable definitions.</documentation>
  2550. <incorrect>
  2551. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2552. <start>
  2553. <element name="foo">
  2554. <empty/>
  2555. </element>
  2556. </start>
  2557. <define name="bar">
  2558. <element>
  2559. <anyName>
  2560. <except>
  2561. <anyName/>
  2562. </except>
  2563. </anyName>
  2564. <empty/>
  2565. </element>
  2566. </define>
  2567. </grammar>
  2568. </incorrect>
  2569. </testCase>
  2570. <testCase>
  2571. <section>4.16</section>
  2572. <incorrect>
  2573. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2574. <attribute name="xmlns">
  2575. <text/>
  2576. </attribute>
  2577. </element>
  2578. </incorrect>
  2579. </testCase>
  2580. <testCase>
  2581. <section>4.16</section>
  2582. <correct>
  2583. <element name="xmlns" xmlns="http://relaxng.org/ns/structure/1.0">
  2584. <empty/>
  2585. </element>
  2586. </correct>
  2587. <valid><xmlns/></valid>
  2588. </testCase>
  2589. <testCase>
  2590. <section>4.16</section>
  2591. <incorrect>
  2592. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2593. <attribute name=" xmlns">
  2594. <text/>
  2595. </attribute>
  2596. </element>
  2597. </incorrect>
  2598. </testCase>
  2599. <testCase>
  2600. <section>4.16</section>
  2601. <incorrect>
  2602. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2603. <optional>
  2604. <notAllowed/>
  2605. <attribute name="xmlns">
  2606. <text/>
  2607. </attribute>
  2608. </optional>
  2609. </element>
  2610. </incorrect>
  2611. </testCase>
  2612. <testCase>
  2613. <section>4.16</section>
  2614. <incorrect>
  2615. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2616. <start>
  2617. <element name="foo">
  2618. <empty/>
  2619. </element>
  2620. </start>
  2621. <define name="foo">
  2622. <attribute name="xmlns">
  2623. <text/>
  2624. </attribute>
  2625. </define>
  2626. </grammar>
  2627. </incorrect>
  2628. </testCase>
  2629. <testCase>
  2630. <section>4.16</section>
  2631. <incorrect>
  2632. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2633. <attribute name="xmlns" ns="">
  2634. <text/>
  2635. </attribute>
  2636. </element>
  2637. </incorrect>
  2638. </testCase>
  2639. <testCase>
  2640. <section>4.16</section>
  2641. <incorrect>
  2642. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2643. <attribute>
  2644. <choice>
  2645. <name ns="">xmlns</name>
  2646. <name>foo</name>
  2647. </choice>
  2648. <text/>
  2649. </attribute>
  2650. </element>
  2651. </incorrect>
  2652. </testCase>
  2653. <testCase>
  2654. <section>4.16</section>
  2655. <incorrect>
  2656. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2657. <attribute>
  2658. <name ns="">xmlns</name>
  2659. <text/>
  2660. </attribute>
  2661. </element>
  2662. </incorrect>
  2663. </testCase>
  2664. <testCase>
  2665. <section>4.16</section>
  2666. <incorrect>
  2667. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2668. <attribute>
  2669. <name>xmlns</name>
  2670. <text/>
  2671. </attribute>
  2672. </element>
  2673. </incorrect>
  2674. </testCase>
  2675. <testCase>
  2676. <section>4.16</section>
  2677. <incorrect>
  2678. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2679. <attribute>
  2680. <name>
  2681. xmlns
  2682. </name>
  2683. <text/>
  2684. </attribute>
  2685. </element>
  2686. </incorrect>
  2687. </testCase>
  2688. <testCase>
  2689. <section>4.16</section>
  2690. <incorrect>
  2691. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2692. <attribute>
  2693. <choice>
  2694. <name>foo</name>
  2695. <name ns="">xmlns</name>
  2696. </choice>
  2697. <text/>
  2698. </attribute>
  2699. </element>
  2700. </incorrect>
  2701. </testCase>
  2702. <testCase>
  2703. <section>4.16</section>
  2704. <incorrect>
  2705. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2706. <oneOrMore>
  2707. <attribute>
  2708. <anyName>
  2709. <except>
  2710. <name>xmlns</name>
  2711. </except>
  2712. </anyName>
  2713. <text/>
  2714. </attribute>
  2715. </oneOrMore>
  2716. </element>
  2717. </incorrect>
  2718. </testCase>
  2719. <testCase>
  2720. <section>4.16</section>
  2721. <incorrect>
  2722. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2723. <oneOrMore>
  2724. <attribute>
  2725. <nsName ns="">
  2726. <except>
  2727. <name>xmlns</name>
  2728. </except>
  2729. </nsName>
  2730. <text/>
  2731. </attribute>
  2732. </oneOrMore>
  2733. </element>
  2734. </incorrect>
  2735. </testCase>
  2736. <testCase>
  2737. <section>4.16</section>
  2738. <incorrect>
  2739. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2740. <attribute ns="http://www.w3.org/2000/xmlns" name="bar">
  2741. <text/>
  2742. </attribute>
  2743. </element>
  2744. </incorrect>
  2745. </testCase>
  2746. <testCase>
  2747. <section>4.16</section>
  2748. <correct>
  2749. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.w3.org/2000/xmlns">
  2750. <empty/>
  2751. </element>
  2752. </correct>
  2753. <valid><foo xmlns="http://www.w3.org/2000/xmlns"/></valid>
  2754. </testCase>
  2755. <testCase>
  2756. <section>4.16</section>
  2757. <incorrect>
  2758. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2759. <data type="token">
  2760. <param name="minLength">2</param>
  2761. </data>
  2762. </element>
  2763. </incorrect>
  2764. </testCase>
  2765. <testCase>
  2766. <section>4.16</section>
  2767. <incorrect>
  2768. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2769. <data type="tok"/>
  2770. </element>
  2771. </incorrect>
  2772. </testCase>
  2773. <testCase>
  2774. <section>4.16</section>
  2775. <incorrect>
  2776. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2777. <value type="tok"/>
  2778. </element>
  2779. </incorrect>
  2780. </testCase>
  2781. <testCase>
  2782. <section>4.16</section>
  2783. <incorrect>
  2784. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2785. <optional>
  2786. <notAllowed/>
  2787. <data type="token">
  2788. <param name="minLength">2</param>
  2789. </data>
  2790. </optional>
  2791. </element>
  2792. </incorrect>
  2793. </testCase>
  2794. <testCase>
  2795. <section>4.16</section>
  2796. <incorrect>
  2797. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2798. <optional>
  2799. <notAllowed/>
  2800. <data type="tok"/>
  2801. </optional>
  2802. </element>
  2803. </incorrect>
  2804. </testCase>
  2805. <testCase>
  2806. <section>4.16</section>
  2807. <incorrect>
  2808. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  2809. <optional>
  2810. <notAllowed/>
  2811. <value type="tok"/>
  2812. </optional>
  2813. </element>
  2814. </incorrect>
  2815. </testCase>
  2816. <testCase>
  2817. <section>4.16</section>
  2818. <incorrect>
  2819. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2820. <start>
  2821. <element name="foo">
  2822. <empty/>
  2823. </element>
  2824. </start>
  2825. <define name="foo">
  2826. <data type="token">
  2827. <param name="minLength">2</param>
  2828. </data>
  2829. </define>
  2830. </grammar>
  2831. </incorrect>
  2832. </testCase>
  2833. <testCase>
  2834. <section>4.16</section>
  2835. <incorrect>
  2836. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2837. <start>
  2838. <element name="foo">
  2839. <empty/>
  2840. </element>
  2841. </start>
  2842. <define name="foo">
  2843. <data type="tok"/>
  2844. </define>
  2845. </grammar>
  2846. </incorrect>
  2847. </testCase>
  2848. <testCase>
  2849. <section>4.16</section>
  2850. <incorrect>
  2851. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2852. <start>
  2853. <element name="foo">
  2854. <empty/>
  2855. </element>
  2856. </start>
  2857. <define name="foo">
  2858. <value type="tok"/>
  2859. </define>
  2860. </grammar>
  2861. </incorrect>
  2862. </testCase>
  2863. </testSuite>
  2864. <testSuite>
  2865. <section>4.17</section>
  2866. <testCase>
  2867. <section>4.17</section>
  2868. <incorrect>
  2869. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2870. <start>
  2871. <ref name="x"/>
  2872. </start>
  2873. <define name="x">
  2874. <element name="foo1">
  2875. <empty/>
  2876. </element>
  2877. </define>
  2878. <define name="x" combine="choice">
  2879. <element name="foo2">
  2880. <empty/>
  2881. </element>
  2882. </define>
  2883. <define name="x">
  2884. <element name="foo3">
  2885. <empty/>
  2886. </element>
  2887. </define>
  2888. </grammar>
  2889. </incorrect>
  2890. </testCase>
  2891. <testCase>
  2892. <section>4.17</section>
  2893. <incorrect>
  2894. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2895. <start name="x">
  2896. <element name="foo1">
  2897. <empty/>
  2898. </element>
  2899. </start>
  2900. <start name="x" combine="choice">
  2901. <element name="foo2">
  2902. <empty/>
  2903. </element>
  2904. </start>
  2905. <start name="x">
  2906. <element name="foo3">
  2907. <empty/>
  2908. </element>
  2909. </start>
  2910. </grammar>
  2911. </incorrect>
  2912. </testCase>
  2913. <testCase>
  2914. <section>4.17</section>
  2915. <incorrect>
  2916. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2917. <start>
  2918. <ref name="x"/>
  2919. </start>
  2920. <define name="x">
  2921. <element name="foo1">
  2922. <empty/>
  2923. </element>
  2924. </define>
  2925. <define name="x">
  2926. <element name="foo2">
  2927. <empty/>
  2928. </element>
  2929. </define>
  2930. </grammar>
  2931. </incorrect>
  2932. </testCase>
  2933. <testCase>
  2934. <section>4.17</section>
  2935. <incorrect>
  2936. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2937. <start name="x">
  2938. <element name="foo1">
  2939. <empty/>
  2940. </element>
  2941. </start>
  2942. <start name="x">
  2943. <element name="foo2">
  2944. <empty/>
  2945. </element>
  2946. </start>
  2947. </grammar>
  2948. </incorrect>
  2949. </testCase>
  2950. <testCase>
  2951. <section>4.17</section>
  2952. <correct>
  2953. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2954. <start>
  2955. <ref name="x"/>
  2956. </start>
  2957. <define name="x" combine="choice">
  2958. <element name="foo1">
  2959. <empty/>
  2960. </element>
  2961. </define>
  2962. <define name="x" combine="choice">
  2963. <element name="foo2">
  2964. <empty/>
  2965. </element>
  2966. </define>
  2967. <define name="x">
  2968. <element name="foo3">
  2969. <empty/>
  2970. </element>
  2971. </define>
  2972. </grammar>
  2973. </correct>
  2974. <valid>
  2975. <foo1/>
  2976. </valid>
  2977. <valid>
  2978. <foo2/>
  2979. </valid>
  2980. <valid>
  2981. <foo3/>
  2982. </valid>
  2983. <invalid>
  2984. <foo4/>
  2985. </invalid>
  2986. </testCase>
  2987. <testCase>
  2988. <section>4.17</section>
  2989. <correct>
  2990. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  2991. <start combine="choice">
  2992. <element name="foo1">
  2993. <empty/>
  2994. </element>
  2995. </start>
  2996. <start combine="choice">
  2997. <element name="foo2">
  2998. <empty/>
  2999. </element>
  3000. </start>
  3001. <start>
  3002. <element name="foo3">
  3003. <empty/>
  3004. </element>
  3005. </start>
  3006. </grammar>
  3007. </correct>
  3008. <valid>
  3009. <foo1/>
  3010. </valid>
  3011. <valid>
  3012. <foo2/>
  3013. </valid>
  3014. <valid>
  3015. <foo3/>
  3016. </valid>
  3017. <invalid>
  3018. <foo4/>
  3019. </invalid>
  3020. </testCase>
  3021. <testCase>
  3022. <section>4.17</section>
  3023. <incorrect>
  3024. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3025. <start>
  3026. <element name="foo">
  3027. <ref name="x"/>
  3028. </element>
  3029. </start>
  3030. <define name="x" combine="choice">
  3031. <element name="bar1">
  3032. <empty/>
  3033. </element>
  3034. </define>
  3035. <define name="x">
  3036. <element name="bar2">
  3037. <empty/>
  3038. </element>
  3039. </define>
  3040. <define name="x" combine="interleave">
  3041. <element name="bar3">
  3042. <empty/>
  3043. </element>
  3044. </define>
  3045. </grammar>
  3046. </incorrect>
  3047. </testCase>
  3048. <testCase>
  3049. <section>4.17</section>
  3050. <incorrect>
  3051. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  3052. <grammar>
  3053. <start name="x" combine="choice">
  3054. <element name="bar1">
  3055. <empty/>
  3056. </element>
  3057. </start>
  3058. <start name="x">
  3059. <element name="bar2">
  3060. <empty/>
  3061. </element>
  3062. </start>
  3063. <start name="x" combine="interleave">
  3064. <element name="bar3">
  3065. <empty/>
  3066. </element>
  3067. </start>
  3068. </grammar>
  3069. </element>
  3070. </incorrect>
  3071. </testCase>
  3072. <testCase>
  3073. <section>4.17</section>
  3074. <correct>
  3075. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3076. <start>
  3077. <element name="foo">
  3078. <ref name="x"/>
  3079. </element>
  3080. </start>
  3081. <define name="x" combine="interleave">
  3082. <element name="bar1">
  3083. <empty/>
  3084. </element>
  3085. </define>
  3086. <define name="x" combine="interleave">
  3087. <element name="bar2">
  3088. <empty/>
  3089. </element>
  3090. </define>
  3091. <define name="x">
  3092. <element name="bar3">
  3093. <empty/>
  3094. </element>
  3095. </define>
  3096. </grammar>
  3097. </correct>
  3098. <valid>
  3099. <foo><bar1/><bar2/><bar3/></foo>
  3100. </valid>
  3101. <valid>
  3102. <foo><bar1/><bar3/><bar2/></foo>
  3103. </valid>
  3104. <valid>
  3105. <foo><bar2/><bar3/><bar1/></foo>
  3106. </valid>
  3107. <invalid>
  3108. <foo><bar2/><bar3/><bar1/><bar2/></foo>
  3109. </invalid>
  3110. </testCase>
  3111. <testCase>
  3112. <section>4.17</section>
  3113. <correct>
  3114. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  3115. <grammar>
  3116. <start combine="interleave">
  3117. <element name="bar1">
  3118. <empty/>
  3119. </element>
  3120. </start>
  3121. <start>
  3122. <element name="bar2">
  3123. <empty/>
  3124. </element>
  3125. </start>
  3126. <start combine="interleave">
  3127. <element name="bar3">
  3128. <empty/>
  3129. </element>
  3130. </start>
  3131. </grammar>
  3132. </element>
  3133. </correct>
  3134. <valid>
  3135. <foo><bar1/><bar2/><bar3/></foo>
  3136. </valid>
  3137. <valid>
  3138. <foo><bar1/><bar3/><bar2/></foo>
  3139. </valid>
  3140. <valid>
  3141. <foo><bar2/><bar3/><bar1/></foo>
  3142. </valid>
  3143. <invalid>
  3144. <foo><bar2/><bar3/><bar1/><bar2/></foo>
  3145. </invalid>
  3146. </testCase>
  3147. <testCase>
  3148. <section>4.17</section>
  3149. <incorrect>
  3150. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3151. <start>
  3152. <element name="foo">
  3153. <ref name="x"/>
  3154. </element>
  3155. </start>
  3156. <define name="x">
  3157. <element name="bar1">
  3158. <empty/>
  3159. </element>
  3160. </define>
  3161. <define name="x" combine="interleave">
  3162. <element name="bar2">
  3163. <empty/>
  3164. </element>
  3165. </define>
  3166. <define name="x">
  3167. <element name="bar3">
  3168. <empty/>
  3169. </element>
  3170. </define>
  3171. </grammar>
  3172. </incorrect>
  3173. </testCase>
  3174. <testCase>
  3175. <section>4.17</section>
  3176. <incorrect>
  3177. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  3178. <grammar>
  3179. <start name="x">
  3180. <element name="bar1">
  3181. <empty/>
  3182. </element>
  3183. </start>
  3184. <start name="x" combine="interleave">
  3185. <element name="bar2">
  3186. <empty/>
  3187. </element>
  3188. </start>
  3189. <start name="x">
  3190. <element name="bar3">
  3191. <empty/>
  3192. </element>
  3193. </start>
  3194. </grammar>
  3195. </element>
  3196. </incorrect>
  3197. </testCase>
  3198. </testSuite>
  3199. <testSuite>
  3200. <section>4.18</section>
  3201. <testCase>
  3202. <section>4.18</section>
  3203. <documentation>grammar must have a start</documentation>
  3204. <incorrect>
  3205. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3206. <define name="foo">
  3207. <element name="foo">
  3208. <empty/>
  3209. </element>
  3210. </define>
  3211. </grammar>
  3212. </incorrect>
  3213. </testCase>
  3214. <testCase>
  3215. <section>4.18</section>
  3216. <documentation>4.17 is before 4.18</documentation>
  3217. <incorrect>
  3218. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3219. <start>
  3220. <element name="foo">
  3221. <empty/>
  3222. </element>
  3223. </start>
  3224. <define name="bar">
  3225. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3226. <define name="foo">
  3227. <element name="foo">
  3228. <empty/>
  3229. </element>
  3230. </define>
  3231. </grammar>
  3232. </define>
  3233. </grammar>
  3234. </incorrect>
  3235. </testCase>
  3236. <testCase>
  3237. <section>4.18</section>
  3238. <documentation>4.17 is before 4.19</documentation>
  3239. <incorrect>
  3240. <choice xmlns="http://relaxng.org/ns/structure/1.0">
  3241. <element name="foo">
  3242. <empty/>
  3243. </element>
  3244. <group>
  3245. <notAllowed/>
  3246. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3247. <define name="foo">
  3248. <element name="foo">
  3249. <empty/>
  3250. </element>
  3251. </define>
  3252. </grammar>
  3253. </group>
  3254. </choice>
  3255. </incorrect>
  3256. </testCase>
  3257. <testCase>
  3258. <section>4.18</section>
  3259. <documentation>every ref must have a def</documentation>
  3260. <incorrect>
  3261. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3262. <start>
  3263. <ref name="foo"/>
  3264. </start>
  3265. </grammar>
  3266. </incorrect>
  3267. </testCase>
  3268. <testCase>
  3269. <section>4.18</section>
  3270. <documentation>4.17 is before 4.18</documentation>
  3271. <incorrect>
  3272. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3273. <start>
  3274. <element name="foo">
  3275. <empty/>
  3276. </element>
  3277. </start>
  3278. <define name="foo">
  3279. <ref name="bar"/>
  3280. </define>
  3281. </grammar>
  3282. </incorrect>
  3283. </testCase>
  3284. <testCase>
  3285. <section>4.18</section>
  3286. <documentation>4.17 is before 4.19</documentation>
  3287. <incorrect>
  3288. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3289. <start>
  3290. <choice>
  3291. <element name="foo">
  3292. <empty/>
  3293. </element>
  3294. <group>
  3295. <notAllowed/>
  3296. <ref name="foo"/>
  3297. </group>
  3298. </choice>
  3299. </start>
  3300. </grammar>
  3301. </incorrect>
  3302. </testCase>
  3303. <testCase>
  3304. <section>4.18</section>
  3305. <documentation>every parentRef must have a def</documentation>
  3306. <incorrect>
  3307. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3308. <start>
  3309. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3310. <start>
  3311. <parentRef name="foo"/>
  3312. </start>
  3313. <define name="foo">
  3314. <element name="foo">
  3315. <empty/>
  3316. </element>
  3317. </define>
  3318. </grammar>
  3319. </start>
  3320. </grammar>
  3321. </incorrect>
  3322. </testCase>
  3323. <testCase>
  3324. <section>4.18</section>
  3325. <documentation>4.17 is before 4.18</documentation>
  3326. <incorrect>
  3327. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3328. <start>
  3329. <element name="foo">
  3330. <empty/>
  3331. </element>
  3332. </start>
  3333. <define name="bar">
  3334. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3335. <start>
  3336. <parentRef name="foo"/>
  3337. </start>
  3338. <define name="foo">
  3339. <element name="foo">
  3340. <empty/>
  3341. </element>
  3342. </define>
  3343. </grammar>
  3344. </define>
  3345. </grammar>
  3346. </incorrect>
  3347. </testCase>
  3348. <testCase>
  3349. <section>4.18</section>
  3350. <documentation>4.17 is before 4.19</documentation>
  3351. <incorrect>
  3352. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3353. <start>
  3354. <choice>
  3355. <element name="foo">
  3356. <empty/>
  3357. </element>
  3358. <group>
  3359. <notAllowed/>
  3360. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3361. <start>
  3362. <parentRef name="foo"/>
  3363. </start>
  3364. <define name="foo">
  3365. <element name="foo">
  3366. <empty/>
  3367. </element>
  3368. </define>
  3369. </grammar>
  3370. </group>
  3371. </choice>
  3372. </start>
  3373. </grammar>
  3374. </incorrect>
  3375. </testCase>
  3376. <testCase>
  3377. <section>4.18</section>
  3378. <incorrect>
  3379. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3380. <start>
  3381. <ref name="foo"/>
  3382. </start>
  3383. <define name="foo">
  3384. <choice>
  3385. <element name="foo">
  3386. <empty/>
  3387. </element>
  3388. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3389. <start>
  3390. <parentRef name="foo"/>
  3391. </start>
  3392. </grammar>
  3393. </choice>
  3394. </define>
  3395. </grammar>
  3396. </incorrect>
  3397. </testCase>
  3398. <testCase>
  3399. <section>4.18</section>
  3400. <correct>
  3401. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3402. <start>
  3403. <ref name="foo"/>
  3404. </start>
  3405. <define name="foo">
  3406. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3407. <start>
  3408. <ref name="foo"/>
  3409. </start>
  3410. <define name="foo">
  3411. <element name="foo">
  3412. <empty/>
  3413. </element>
  3414. </define>
  3415. </grammar>
  3416. </define>
  3417. </grammar>
  3418. </correct>
  3419. <valid><foo/></valid>
  3420. </testCase>
  3421. <testCase>
  3422. <section>4.18</section>
  3423. <correct>
  3424. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3425. <start>
  3426. <grammar>
  3427. <start>
  3428. <ref name="foo"/>
  3429. </start>
  3430. <define name="foo">
  3431. <element name="innerFoo">
  3432. <parentRef name="foo"/>
  3433. </element>
  3434. </define>
  3435. </grammar>
  3436. </start>
  3437. <define name="foo">
  3438. <element name="outerFoo">
  3439. <empty/>
  3440. </element>
  3441. </define>
  3442. </grammar>
  3443. </correct>
  3444. <valid><innerFoo><outerFoo/></innerFoo></valid>
  3445. <invalid><outerFoo/></invalid>
  3446. </testCase>
  3447. <testCase>
  3448. <section>4.18</section>
  3449. <correct>
  3450. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3451. <start>
  3452. <ref name="foo"/>
  3453. </start>
  3454. <define name="foo">
  3455. <element name="outerFoo">
  3456. <grammar>
  3457. <start>
  3458. <ref name="foo"/>
  3459. </start>
  3460. <define name="foo">
  3461. <element name="innerFoo">
  3462. <empty/>
  3463. </element>
  3464. </define>
  3465. </grammar>
  3466. </element>
  3467. </define>
  3468. </grammar>
  3469. </correct>
  3470. <valid><outerFoo><innerFoo/></outerFoo></valid>
  3471. <invalid><innerFoo/></invalid>
  3472. </testCase>
  3473. </testSuite>
  3474. <testSuite>
  3475. <section>4.19</section>
  3476. <testCase>
  3477. <section>4.19</section>
  3478. <incorrect>
  3479. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3480. <start>
  3481. <element name="foo">
  3482. <ref name="bar"/>
  3483. </element>
  3484. </start>
  3485. <define name="bar">
  3486. <optional>
  3487. <element name="bar">
  3488. <empty/>
  3489. </element>
  3490. <ref name="bar"/>
  3491. </optional>
  3492. </define>
  3493. </grammar>
  3494. </incorrect>
  3495. </testCase>
  3496. <testCase>
  3497. <section>4.19</section>
  3498. <correct>
  3499. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3500. <start>
  3501. <element name="foo">
  3502. <ref name="bar"/>
  3503. </element>
  3504. </start>
  3505. <define name="bar">
  3506. <element name="bar">
  3507. <optional>
  3508. <ref name="bar"/>
  3509. </optional>
  3510. </element>
  3511. </define>
  3512. </grammar>
  3513. </correct>
  3514. <valid>
  3515. <foo><bar/></foo>
  3516. </valid>
  3517. <valid>
  3518. <foo><bar><bar/></bar></foo>
  3519. </valid>
  3520. <invalid>
  3521. <foo/>
  3522. </invalid>
  3523. </testCase>
  3524. <testCase>
  3525. <section>4.19</section>
  3526. <correct>
  3527. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3528. <start>
  3529. <element name="foo">
  3530. <empty/>
  3531. </element>
  3532. </start>
  3533. <define name="bar">
  3534. <ref name="bar"/>
  3535. </define>
  3536. </grammar>
  3537. </correct>
  3538. <valid><foo/></valid>
  3539. </testCase>
  3540. <testCase>
  3541. <section>4.19</section>
  3542. <section>4.20</section>
  3543. <documentation>Tests that recursion detection happens before
  3544. normalization of notAllowed.</documentation>
  3545. <incorrect>
  3546. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  3547. <start>
  3548. <choice>
  3549. <element name="foo">
  3550. <empty/>
  3551. </element>
  3552. <group>
  3553. <notAllowed/>
  3554. <ref name="bar"/>
  3555. </group>
  3556. </choice>
  3557. </start>
  3558. <define name="bar">
  3559. <element name="bar">
  3560. <empty/>
  3561. </element>
  3562. <optional>
  3563. <ref name="bar"/>
  3564. </optional>
  3565. </define>
  3566. </grammar>
  3567. </incorrect>
  3568. </testCase>
  3569. </testSuite>
  3570. </testSuite>
  3571. <testSuite>
  3572. <section>6</section>
  3573. <testSuite>
  3574. <section>6.1</section>
  3575. <testCase>
  3576. <section>6.1</section>
  3577. <correct>
  3578. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3579. <anyName/>
  3580. <empty/>
  3581. </element>
  3582. </correct>
  3583. <valid>
  3584. <foo/>
  3585. </valid>
  3586. <valid>
  3587. <foo xmlns="http://www.example.com"/>
  3588. </valid>
  3589. </testCase>
  3590. <testCase>
  3591. <section>6.1</section>
  3592. <correct>
  3593. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3594. <anyName>
  3595. <except>
  3596. <name ns="">foo</name>
  3597. </except>
  3598. </anyName>
  3599. <empty/>
  3600. </element>
  3601. </correct>
  3602. <invalid>
  3603. <foo/>
  3604. </invalid>
  3605. <valid>
  3606. <foo xmlns="http://www.example.com"/>
  3607. </valid>
  3608. <valid>
  3609. <bar/>
  3610. </valid>
  3611. </testCase>
  3612. <testCase>
  3613. <section>6.1</section>
  3614. <correct>
  3615. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3616. <anyName>
  3617. <except>
  3618. <nsName ns=""/>
  3619. </except>
  3620. </anyName>
  3621. <empty/>
  3622. </element>
  3623. </correct>
  3624. <invalid>
  3625. <foo/>
  3626. </invalid>
  3627. <valid>
  3628. <foo xmlns="http://www.example.com"/>
  3629. </valid>
  3630. </testCase>
  3631. <testCase>
  3632. <section>6.1</section>
  3633. <correct>
  3634. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3635. <nsName ns=""/>
  3636. <empty/>
  3637. </element>
  3638. </correct>
  3639. <valid>
  3640. <foo/>
  3641. </valid>
  3642. <invalid>
  3643. <foo xmlns="http://www.example.com"/>
  3644. </invalid>
  3645. </testCase>
  3646. <testCase>
  3647. <section>6.1</section>
  3648. <correct>
  3649. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3650. <nsName ns="http://www.example.com"/>
  3651. <empty/>
  3652. </element>
  3653. </correct>
  3654. <invalid>
  3655. <foo/>
  3656. </invalid>
  3657. <invalid>
  3658. <foo xmlns="HTTP://www.example.com"/>
  3659. </invalid>
  3660. <invalid>
  3661. <foo xmlns="http://www.example.com/"/>
  3662. </invalid>
  3663. <valid>
  3664. <foo xmlns="http://www.example.com"/>
  3665. </valid>
  3666. </testCase>
  3667. <testCase>
  3668. <section>6.1</section>
  3669. <correct>
  3670. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3671. <nsName ns="http://www.example.com">
  3672. <except>
  3673. <name ns="http://www.example.com">foo</name>
  3674. </except>
  3675. </nsName>
  3676. <empty/>
  3677. </element>
  3678. </correct>
  3679. <invalid>
  3680. <foo/>
  3681. </invalid>
  3682. <invalid>
  3683. <foo xmlns="http://www.example.com"/>
  3684. </invalid>
  3685. <valid>
  3686. <bar xmlns="http://www.example.com"/>
  3687. </valid>
  3688. </testCase>
  3689. <testCase>
  3690. <section>6.1</section>
  3691. <correct>
  3692. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3693. <nsName ns="http://www.example.com">
  3694. <except>
  3695. <name ns="">foo</name>
  3696. </except>
  3697. </nsName>
  3698. <empty/>
  3699. </element>
  3700. </correct>
  3701. <invalid>
  3702. <bar/>
  3703. </invalid>
  3704. <invalid>
  3705. <foo/>
  3706. </invalid>
  3707. <valid>
  3708. <foo xmlns="http://www.example.com"/>
  3709. </valid>
  3710. <valid>
  3711. <bar xmlns="http://www.example.com"/>
  3712. </valid>
  3713. </testCase>
  3714. <testCase>
  3715. <section>6.1</section>
  3716. <correct>
  3717. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3718. <name ns="http://www.example.com">foo</name>
  3719. <empty/>
  3720. </element>
  3721. </correct>
  3722. <valid>
  3723. <foo xmlns="http://www.example.com"/>
  3724. </valid>
  3725. <invalid>
  3726. <foo/>
  3727. </invalid>
  3728. <invalid>
  3729. <bar xmlns="http://www.example.com"/>
  3730. </invalid>
  3731. <invalid>
  3732. <foo xmlns="http://www.example.org"/>
  3733. </invalid>
  3734. </testCase>
  3735. <testCase>
  3736. <section>6.1</section>
  3737. <correct>
  3738. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3739. <name ns="">foo</name>
  3740. <empty/>
  3741. </element>
  3742. </correct>
  3743. <invalid>
  3744. <foo xmlns="http://www.example.com"/>
  3745. </invalid>
  3746. <valid>
  3747. <foo/>
  3748. </valid>
  3749. <invalid>
  3750. <bar xmlns="http://www.example.com"/>
  3751. </invalid>
  3752. <invalid>
  3753. <bar/>
  3754. </invalid>
  3755. </testCase>
  3756. <testCase>
  3757. <section>6.1</section>
  3758. <correct>
  3759. <element xmlns="http://relaxng.org/ns/structure/1.0">
  3760. <choice>
  3761. <name ns="">foo</name>
  3762. <name ns="">bar</name>
  3763. </choice>
  3764. <empty/>
  3765. </element>
  3766. </correct>
  3767. <invalid>
  3768. <baz/>
  3769. </invalid>
  3770. <valid>
  3771. <foo/>
  3772. </valid>
  3773. <valid>
  3774. <bar/>
  3775. </valid>
  3776. </testCase>
  3777. </testSuite>
  3778. <testSuite>
  3779. <section>6.2</section>
  3780. <testSuite>
  3781. <section>6.2.1</section>
  3782. <testCase>
  3783. <section>6.2.1</section>
  3784. <correct>
  3785. <choice xmlns="http://relaxng.org/ns/structure/1.0">
  3786. <element name="foo">
  3787. <empty/>
  3788. </element>
  3789. <element name="bar">
  3790. <empty/>
  3791. </element>
  3792. </choice>
  3793. </correct>
  3794. <valid>
  3795. <foo/>
  3796. </valid>
  3797. <valid>
  3798. <bar/>
  3799. </valid>
  3800. <invalid>
  3801. <baz/>
  3802. </invalid>
  3803. </testCase>
  3804. <testCase>
  3805. <section>6.2.1</section>
  3806. <correct>
  3807. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  3808. <choice>
  3809. <group>
  3810. <element name="bar1">
  3811. <empty/>
  3812. </element>
  3813. <element name="bar2">
  3814. <empty/>
  3815. </element>
  3816. </group>
  3817. <group>
  3818. <element name="bar1">
  3819. <empty/>
  3820. </element>
  3821. <element name="bar3">
  3822. <empty/>
  3823. </element>
  3824. </group>
  3825. </choice>
  3826. </element>
  3827. </correct>
  3828. <valid>
  3829. <foo><bar1/><bar2/></foo>
  3830. </valid>
  3831. <valid>
  3832. <foo><bar1/><bar3/></foo>
  3833. </valid>
  3834. <invalid>
  3835. <foo><bar1/></foo>
  3836. </invalid>
  3837. <invalid>
  3838. <foo/>
  3839. </invalid>
  3840. <invalid>
  3841. <foo><bar2/></foo>
  3842. </invalid>
  3843. <invalid>
  3844. <foo><bar3/></foo>
  3845. </invalid>
  3846. <invalid>
  3847. <foo><bar1/><bar2/><bar3/></foo>
  3848. </invalid>
  3849. </testCase>
  3850. <testCase>
  3851. <section>6.2.1</section>
  3852. <correct>
  3853. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  3854. <choice>
  3855. <group>
  3856. <attribute name="bar1">
  3857. <text/>
  3858. </attribute>
  3859. <attribute name="bar2">
  3860. <text/>
  3861. </attribute>
  3862. </group>
  3863. <group>
  3864. <attribute name="bar1">
  3865. <text/>
  3866. </attribute>
  3867. <attribute name="bar3">
  3868. <text/>
  3869. </attribute>
  3870. </group>
  3871. </choice>
  3872. </element>
  3873. </correct>
  3874. <valid>
  3875. <foo bar1="x" bar2="x"/>
  3876. </valid>
  3877. <valid>
  3878. <foo bar1="x" bar3="x"/>
  3879. </valid>
  3880. <invalid>
  3881. <foo/>
  3882. </invalid>
  3883. <invalid>
  3884. <foo bar1="x"/>
  3885. </invalid>
  3886. <invalid>
  3887. <foo bar2="x"/>
  3888. </invalid>
  3889. <invalid>
  3890. <foo bar3="x"/>
  3891. </invalid>
  3892. <invalid>
  3893. <foo bar1="x" bar2="x" bar3="x"/>
  3894. </invalid>
  3895. </testCase>
  3896. <testCase>
  3897. <section>6.2.1</section>
  3898. <correct>
  3899. <choice xmlns="http://relaxng.org/ns/structure/1.0">
  3900. <element name="foo">
  3901. <element name="bar">
  3902. <empty/>
  3903. </element>
  3904. </element>
  3905. <element name="foo">
  3906. <element name="baz">
  3907. <empty/>
  3908. </element>
  3909. </element>
  3910. </choice>
  3911. </correct>
  3912. <valid>
  3913. <foo><bar/></foo>
  3914. </valid>
  3915. <valid>
  3916. <foo><baz/></foo>
  3917. </valid>
  3918. <invalid>
  3919. <foo/>
  3920. </invalid>
  3921. <invalid>
  3922. <foo><bar/><bar/></foo>
  3923. </invalid>
  3924. <invalid>
  3925. <foo><foo/></foo>
  3926. </invalid>
  3927. <invalid>
  3928. <bar/>
  3929. </invalid>
  3930. <invalid>
  3931. <fobaz/>
  3932. </invalid>
  3933. </testCase>
  3934. </testSuite>
  3935. <testSuite>
  3936. <section>6.2.2</section>
  3937. <testCase>
  3938. <section>6.2.2</section>
  3939. <correct>
  3940. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  3941. <group>
  3942. <element name="bar">
  3943. <empty/>
  3944. </element>
  3945. <element name="baz">
  3946. <empty/>
  3947. </element>
  3948. </group>
  3949. </element>
  3950. </correct>
  3951. <valid>
  3952. <foo><bar/><baz/></foo>
  3953. </valid>
  3954. <invalid>
  3955. <foo><baz/><bar/></foo>
  3956. </invalid>
  3957. <invalid>
  3958. <foo><bar/><baz/><bar/><baz/></foo>
  3959. </invalid>
  3960. <invalid>
  3961. <foo/>
  3962. </invalid>
  3963. <invalid>
  3964. <foo><bar/></foo>
  3965. </invalid>
  3966. <invalid>
  3967. <foo><baz/></foo>
  3968. </invalid>
  3969. </testCase>
  3970. <testCase>
  3971. <section>6.2.2</section>
  3972. <correct>
  3973. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  3974. <group>
  3975. <attribute name="bar">
  3976. <text/>
  3977. </attribute>
  3978. <attribute name="baz">
  3979. <text/>
  3980. </attribute>
  3981. </group>
  3982. </element>
  3983. </correct>
  3984. <valid>
  3985. <foo bar="x" baz="x"/>
  3986. </valid>
  3987. <invalid>
  3988. <foo/>
  3989. </invalid>
  3990. </testCase>
  3991. <testCase>
  3992. <section>6.2.2</section>
  3993. <correct>
  3994. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  3995. <group>
  3996. <attribute name="bar">
  3997. <text/>
  3998. </attribute>
  3999. <attribute name="baz">
  4000. <text/>
  4001. </attribute>
  4002. </group>
  4003. </element>
  4004. </correct>
  4005. <valid>
  4006. <foo bar="x" baz="x"/>
  4007. </valid>
  4008. <invalid>
  4009. <foo/>
  4010. </invalid>
  4011. <invalid>
  4012. <foo bar="x"/>
  4013. </invalid>
  4014. <invalid>
  4015. <foo baz="x"/>
  4016. </invalid>
  4017. </testCase>
  4018. <testCase>
  4019. <section>6.2.2</section>
  4020. <correct>
  4021. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4022. <group>
  4023. <attribute name="baz">
  4024. <text/>
  4025. </attribute>
  4026. <attribute name="bar">
  4027. <text/>
  4028. </attribute>
  4029. </group>
  4030. </element>
  4031. </correct>
  4032. <valid>
  4033. <foo bar="x" baz="x"/>
  4034. </valid>
  4035. <invalid>
  4036. <foo/>
  4037. </invalid>
  4038. <invalid>
  4039. <foo bar="x"/>
  4040. </invalid>
  4041. <invalid>
  4042. <foo baz="x"/>
  4043. </invalid>
  4044. </testCase>
  4045. <testCase>
  4046. <section>6.2.2</section>
  4047. <correct>
  4048. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4049. <group>
  4050. <attribute name="bar">
  4051. <text/>
  4052. </attribute>
  4053. <element name="baz">
  4054. <empty/>
  4055. </element>
  4056. </group>
  4057. </element>
  4058. </correct>
  4059. <valid>
  4060. <foo bar="x"><baz/></foo>
  4061. </valid>
  4062. <invalid>
  4063. <foo><baz/></foo>
  4064. </invalid>
  4065. <invalid>
  4066. <foo bar="x"/>
  4067. </invalid>
  4068. <invalid>
  4069. <foo baz="x"><bar/></foo>
  4070. </invalid>
  4071. </testCase>
  4072. <testCase>
  4073. <section>6.2.2</section>
  4074. <correct>
  4075. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4076. <group>
  4077. <element name="baz">
  4078. <empty/>
  4079. </element>
  4080. <attribute name="bar">
  4081. <text/>
  4082. </attribute>
  4083. </group>
  4084. </element>
  4085. </correct>
  4086. <valid>
  4087. <foo bar="x"><baz/></foo>
  4088. </valid>
  4089. <invalid>
  4090. <foo><baz/></foo>
  4091. </invalid>
  4092. <invalid>
  4093. <foo bar="x"/>
  4094. </invalid>
  4095. <invalid>
  4096. <foo baz="x"><bar/></foo>
  4097. </invalid>
  4098. </testCase>
  4099. </testSuite>
  4100. <testSuite>
  4101. <section>6.2.3</section>
  4102. <testCase>
  4103. <section>6.2.3</section>
  4104. <correct>
  4105. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4106. <empty/>
  4107. </element>
  4108. </correct>
  4109. <valid>
  4110. <foo/>
  4111. </valid>
  4112. <valid>
  4113. <foo> </foo>
  4114. </valid>
  4115. <valid>
  4116. <foo>
  4117. </foo>
  4118. </valid>
  4119. <valid>
  4120. <foo>
  4121. <?target data?>
  4122. <?target data?>
  4123. <?target data?>
  4124. <?target data?>
  4125. </foo>
  4126. </valid>
  4127. <invalid>
  4128. <foo>x</foo>
  4129. </invalid>
  4130. <invalid>
  4131. <foo><bar/></foo>
  4132. </invalid>
  4133. <invalid>
  4134. <foo bar="x"/>
  4135. </invalid>
  4136. </testCase>
  4137. <testCase>
  4138. <section>6.2.3</section>
  4139. <correct>
  4140. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4141. <attribute name="bar">
  4142. <empty/>
  4143. </attribute>
  4144. </element>
  4145. </correct>
  4146. <valid><foo bar=""/></valid>
  4147. <valid><foo bar=" "/></valid>
  4148. <invalid><foo bar="x"/></invalid>
  4149. </testCase>
  4150. <testCase>
  4151. <section>6.2.3</section>
  4152. <correct>
  4153. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4154. <list>
  4155. <empty/>
  4156. </list>
  4157. </element>
  4158. </correct>
  4159. <valid><foo/></valid>
  4160. <valid><foo> </foo></valid>
  4161. <invalid><foo>x</foo></invalid>
  4162. <invalid><foo><bar/></foo></invalid>
  4163. <invalid><foo bar=""/></invalid>
  4164. </testCase>
  4165. <testCase>
  4166. <section>6.2.3</section>
  4167. <correct>
  4168. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4169. <attribute name="bar">
  4170. <list>
  4171. <empty/>
  4172. </list>
  4173. </attribute>
  4174. </element>
  4175. </correct>
  4176. <valid><foo bar=""/></valid>
  4177. <valid><foo bar=" "/></valid>
  4178. <invalid><foo bar="x"/></invalid>
  4179. </testCase>
  4180. <testCase>
  4181. <section>6.2.3</section>
  4182. <correct>
  4183. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4184. <group>
  4185. <element name="bar">
  4186. <empty/>
  4187. </element>
  4188. <choice>
  4189. <empty/>
  4190. <element name="baz">
  4191. <empty/>
  4192. </element>
  4193. </choice>
  4194. </group>
  4195. </element>
  4196. </correct>
  4197. <valid>
  4198. <foo><bar/><baz/></foo>
  4199. </valid>
  4200. <valid>
  4201. <foo><bar/></foo>
  4202. </valid>
  4203. <invalid>
  4204. <foo></foo>
  4205. </invalid>
  4206. <invalid>
  4207. <foo><bar/><baz/><baz/></foo>
  4208. </invalid>
  4209. </testCase>
  4210. <testCase>
  4211. <correct>
  4212. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4213. <choice>
  4214. <empty/>
  4215. <attribute name="bar">
  4216. <text/>
  4217. </attribute>
  4218. </choice>
  4219. </element>
  4220. </correct>
  4221. <valid>
  4222. <foo bar="x"/>
  4223. </valid>
  4224. <valid>
  4225. <foo/>
  4226. </valid>
  4227. <invalid>
  4228. <foo baz="x"/>
  4229. </invalid>
  4230. <invalid>
  4231. <foo><bar/></foo>
  4232. </invalid>
  4233. </testCase>
  4234. </testSuite>
  4235. <testSuite>
  4236. <section>6.2.4</section>
  4237. <testCase>
  4238. <section>6.2.4</section>
  4239. <correct>
  4240. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4241. <text/>
  4242. </element>
  4243. </correct>
  4244. <valid>
  4245. <foo/>
  4246. </valid>
  4247. <valid>
  4248. <foo> </foo>
  4249. </valid>
  4250. <valid>
  4251. <foo>x</foo>
  4252. </valid>
  4253. <valid>
  4254. <foo>
  4255. x
  4256. <?target data?>
  4257. y
  4258. </foo>
  4259. </valid>
  4260. <invalid>
  4261. <foo><bar/></foo>
  4262. </invalid>
  4263. </testCase>
  4264. <testCase>
  4265. <section>6.2.4</section>
  4266. <correct>
  4267. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4268. <group>
  4269. <text/>
  4270. <element name="bar">
  4271. <empty/>
  4272. </element>
  4273. </group>
  4274. </element>
  4275. </correct>
  4276. <valid>
  4277. <foo><bar/></foo>
  4278. </valid>
  4279. <valid>
  4280. <foo>
  4281. <bar/>
  4282. </foo>
  4283. </valid>
  4284. <valid>
  4285. <foo>
  4286. x
  4287. <bar/>
  4288. </foo>
  4289. </valid>
  4290. <valid>
  4291. <foo>
  4292. x
  4293. <?target data?>
  4294. y
  4295. <bar/></foo>
  4296. </valid>
  4297. <invalid>
  4298. <foo/>
  4299. </invalid>
  4300. <invalid>
  4301. <foo><bar/>x</foo>
  4302. </invalid>
  4303. </testCase>
  4304. <testCase>
  4305. <section>6.2.4</section>
  4306. <correct>
  4307. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4308. <group>
  4309. <element name="bar">
  4310. <empty/>
  4311. </element>
  4312. <text/>
  4313. </group>
  4314. </element>
  4315. </correct>
  4316. <valid>
  4317. <foo><bar/></foo>
  4318. </valid>
  4319. <valid>
  4320. <foo>
  4321. <bar/>
  4322. </foo>
  4323. </valid>
  4324. <invalid>
  4325. <foo>
  4326. x
  4327. <bar/>
  4328. </foo>
  4329. </invalid>
  4330. <valid>
  4331. <foo>
  4332. <bar/>
  4333. x
  4334. <?target data?>
  4335. y
  4336. </foo>
  4337. </valid>
  4338. <invalid>
  4339. <foo/>
  4340. </invalid>
  4341. <valid>
  4342. <foo><bar/>x</foo>
  4343. </valid>
  4344. </testCase>
  4345. <testCase>
  4346. <section>6.2.4</section>
  4347. <correct>
  4348. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4349. <interleave>
  4350. <element name="bar">
  4351. <empty/>
  4352. </element>
  4353. <text/>
  4354. </interleave>
  4355. </element>
  4356. </correct>
  4357. <valid>
  4358. <foo><bar/></foo>
  4359. </valid>
  4360. <valid>
  4361. <foo>
  4362. <bar/>
  4363. </foo>
  4364. </valid>
  4365. <valid>
  4366. <foo>
  4367. x
  4368. <bar/>
  4369. </foo>
  4370. </valid>
  4371. <valid>
  4372. <foo>
  4373. <bar/>
  4374. x
  4375. <?target data?>
  4376. y
  4377. </foo>
  4378. </valid>
  4379. <invalid>
  4380. <foo/>
  4381. </invalid>
  4382. <valid>
  4383. <foo><bar/>x</foo>
  4384. </valid>
  4385. <valid>
  4386. <foo>x<bar/>x</foo>
  4387. </valid>
  4388. <invalid>
  4389. <foo>x<bar/>x<bar/></foo>
  4390. </invalid>
  4391. </testCase>
  4392. <testCase>
  4393. <section>6.2.4</section>
  4394. <correct>
  4395. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4396. <attribute name="bar">
  4397. <text/>
  4398. </attribute>
  4399. </element>
  4400. </correct>
  4401. <valid>
  4402. <foo bar=""/>
  4403. </valid>
  4404. <valid>
  4405. <foo bar="x"/>
  4406. </valid>
  4407. <valid>
  4408. <foo bar=" "/>
  4409. </valid>
  4410. <invalid>
  4411. <foo/>
  4412. </invalid>
  4413. <invalid>
  4414. <foo><bar/>x<bar/></foo>
  4415. </invalid>
  4416. </testCase>
  4417. </testSuite>
  4418. <testSuite>
  4419. <section>6.2.5</section>
  4420. <testCase>
  4421. <section>6.2.5</section>
  4422. <correct>
  4423. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4424. <oneOrMore>
  4425. <element name="bar">
  4426. <empty/>
  4427. </element>
  4428. </oneOrMore>
  4429. </element>
  4430. </correct>
  4431. <valid>
  4432. <foo><bar/></foo>
  4433. </valid>
  4434. <valid>
  4435. <foo><bar/><bar/></foo>
  4436. </valid>
  4437. <valid>
  4438. <foo><bar/><bar/><bar/></foo>
  4439. </valid>
  4440. <invalid>
  4441. <foo/>
  4442. </invalid>
  4443. </testCase>
  4444. <testCase>
  4445. <section>6.2.5</section>
  4446. <correct>
  4447. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4448. <oneOrMore>
  4449. <group>
  4450. <element name="bar">
  4451. <empty/>
  4452. </element>
  4453. <element name="bar">
  4454. <empty/>
  4455. </element>
  4456. </group>
  4457. </oneOrMore>
  4458. </element>
  4459. </correct>
  4460. <valid>
  4461. <foo><bar/><bar/></foo>
  4462. </valid>
  4463. <valid>
  4464. <foo><bar/><bar/><bar/><bar/></foo>
  4465. </valid>
  4466. <valid>
  4467. <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>
  4468. </valid>
  4469. <invalid>
  4470. <foo><bar/></foo>
  4471. </invalid>
  4472. <invalid>
  4473. <foo/>
  4474. </invalid>
  4475. <invalid>
  4476. <foo><bar/><bar/><bar/></foo>
  4477. </invalid>
  4478. </testCase>
  4479. <testCase>
  4480. <section>6.2.5</section>
  4481. <correct>
  4482. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4483. <oneOrMore>
  4484. <attribute>
  4485. <nsName ns=""/>
  4486. <text/>
  4487. </attribute>
  4488. </oneOrMore>
  4489. </element>
  4490. </correct>
  4491. <valid>
  4492. <foo x=""/>
  4493. </valid>
  4494. <valid>
  4495. <foo x="" y=""/>
  4496. </valid>
  4497. <valid>
  4498. <foo x="" y="" z=""/>
  4499. </valid>
  4500. <invalid>
  4501. <foo/>
  4502. </invalid>
  4503. <invalid>
  4504. <foo xmlns:ns="http://www.example.com" ns:x=""/>
  4505. </invalid>
  4506. <invalid>
  4507. <foo x="" xmlns:ns="http://www.example.com" ns:x=""/>
  4508. </invalid>
  4509. </testCase>
  4510. <testCase>
  4511. <section>6.2.5</section>
  4512. <correct>
  4513. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4514. <oneOrMore>
  4515. <choice>
  4516. <attribute name="bar">
  4517. <text/>
  4518. </attribute>
  4519. <element name="bar">
  4520. <text/>
  4521. </element>
  4522. </choice>
  4523. </oneOrMore>
  4524. </element>
  4525. </correct>
  4526. <valid>
  4527. <foo bar=""><bar/><bar/></foo>
  4528. </valid>
  4529. <valid>
  4530. <foo><bar/></foo>
  4531. </valid>
  4532. <valid>
  4533. <foo bar=""/>
  4534. </valid>
  4535. <invalid>
  4536. <foo/>
  4537. </invalid>
  4538. </testCase>
  4539. </testSuite>
  4540. <testSuite>
  4541. <section>6.2.6</section>
  4542. <testCase>
  4543. <section>6.2.6</section>
  4544. <correct>
  4545. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4546. <interleave>
  4547. <element name="bar">
  4548. <empty/>
  4549. </element>
  4550. <element name="baz">
  4551. <empty/>
  4552. </element>
  4553. </interleave>
  4554. </element>
  4555. </correct>
  4556. <valid>
  4557. <foo><bar/><baz/></foo>
  4558. </valid>
  4559. <valid>
  4560. <foo><baz/><bar/></foo>
  4561. </valid>
  4562. <invalid>
  4563. <foo><bar/></foo>
  4564. </invalid>
  4565. <invalid>
  4566. <foo><baz/></foo>
  4567. </invalid>
  4568. <invalid>
  4569. <foo><bar/><bar/></foo>
  4570. </invalid>
  4571. <invalid>
  4572. <foo/>
  4573. </invalid>
  4574. </testCase>
  4575. <testCase>
  4576. <section>6.2.6</section>
  4577. <correct>
  4578. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4579. <interleave>
  4580. <group>
  4581. <element name="bar1">
  4582. <empty/>
  4583. </element>
  4584. <element name="bar2">
  4585. <empty/>
  4586. </element>
  4587. </group>
  4588. <element name="baz">
  4589. <empty/>
  4590. </element>
  4591. </interleave>
  4592. </element>
  4593. </correct>
  4594. <valid>
  4595. <foo><baz/><bar1/><bar2/></foo>
  4596. </valid>
  4597. <valid>
  4598. <foo><bar1/><baz/><bar2/></foo>
  4599. </valid>
  4600. <valid>
  4601. <foo><bar1/><bar2/><baz/></foo>
  4602. </valid>
  4603. <invalid>
  4604. <foo><baz/><bar2/><bar1/></foo>
  4605. </invalid>
  4606. <invalid>
  4607. <foo><bar2/><bar1/></foo>
  4608. </invalid>
  4609. <invalid>
  4610. <foo><baz/><bar2/><bar1/></foo>
  4611. </invalid>
  4612. <invalid>
  4613. <foo><baz/><bar1/></foo>
  4614. </invalid>
  4615. <invalid>
  4616. <foo><baz/><bar2/></foo>
  4617. </invalid>
  4618. </testCase>
  4619. <testCase>
  4620. <section>6.2.6</section>
  4621. <correct>
  4622. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4623. <interleave>
  4624. <attribute name="bar">
  4625. <text/>
  4626. </attribute>
  4627. <attribute name="baz">
  4628. <text/>
  4629. </attribute>
  4630. </interleave>
  4631. </element>
  4632. </correct>
  4633. <valid>
  4634. <foo bar="" baz=""/>
  4635. </valid>
  4636. <invalid>
  4637. <foo/>
  4638. </invalid>
  4639. <invalid>
  4640. <foo/>
  4641. </invalid>
  4642. <invalid>
  4643. <foo bar=""/>
  4644. </invalid>
  4645. <invalid>
  4646. <foo baz=""/>
  4647. </invalid>
  4648. </testCase>
  4649. <testCase>
  4650. <section>6.2.6</section>
  4651. <correct>
  4652. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4653. <interleave>
  4654. <element name="bar">
  4655. <empty/>
  4656. </element>
  4657. <attribute name="baz">
  4658. <text/>
  4659. </attribute>
  4660. </interleave>
  4661. </element>
  4662. </correct>
  4663. <valid>
  4664. <foo baz=""><bar/></foo>
  4665. </valid>
  4666. <invalid>
  4667. <foo/>
  4668. </invalid>
  4669. <invalid>
  4670. <foo bar=""/>
  4671. </invalid>
  4672. <invalid>
  4673. <foo bar=""><baz/><baz/></foo>
  4674. </invalid>
  4675. <invalid>
  4676. <foo><baz/><baz/></foo>
  4677. </invalid>
  4678. </testCase>
  4679. </testSuite>
  4680. <testSuite>
  4681. <section>6.2.7</section>
  4682. <testCase>
  4683. <section>6.2.7</section>
  4684. <correct>
  4685. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4686. <attribute>
  4687. <name ns="">bar</name>
  4688. <value type="string" datatypeLibrary="">baz</value>
  4689. </attribute>
  4690. </element>
  4691. </correct>
  4692. <valid>
  4693. <foo bar="baz"/>
  4694. </valid>
  4695. <invalid>
  4696. <foo bar=" baz"/>
  4697. </invalid>
  4698. <invalid>
  4699. <foo bar="b"/>
  4700. </invalid>
  4701. <invalid>
  4702. <foo bar=""/>
  4703. </invalid>
  4704. <invalid>
  4705. <foo bar=" "/>
  4706. </invalid>
  4707. <invalid>
  4708. <foo><bar>baz</bar></foo>
  4709. </invalid>
  4710. </testCase>
  4711. <testCase>
  4712. <section>6.2.7</section>
  4713. <correct>
  4714. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4715. <attribute>
  4716. <name ns="">bar</name>
  4717. <choice>
  4718. <value type="string" datatypeLibrary="">baz</value>
  4719. <empty/>
  4720. </choice>
  4721. </attribute>
  4722. </element>
  4723. </correct>
  4724. <valid>
  4725. <foo bar="baz"/>
  4726. </valid>
  4727. <valid>
  4728. <foo bar=""/>
  4729. </valid>
  4730. <invalid>
  4731. <foo bar=" baz"/>
  4732. </invalid>
  4733. <invalid>
  4734. <foo bar="b"/>
  4735. </invalid>
  4736. <invalid>
  4737. <foo><bar>baz</bar></foo>
  4738. </invalid>
  4739. <invalid>
  4740. <foo><bar/></foo>
  4741. </invalid>
  4742. <invalid>
  4743. <foo/>
  4744. </invalid>
  4745. </testCase>
  4746. <testCase>
  4747. <section>6.2.7</section>
  4748. <correct>
  4749. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4750. <attribute>
  4751. <name ns="">bar</name>
  4752. <value type="string"/>
  4753. </attribute>
  4754. </element>
  4755. </correct>
  4756. <valid>
  4757. <foo bar=""/>
  4758. </valid>
  4759. <invalid>
  4760. <foo bar=" "/>
  4761. </invalid>
  4762. <invalid>
  4763. <foo bar="x"/>
  4764. </invalid>
  4765. </testCase>
  4766. <testCase>
  4767. <section>6.2.7</section>
  4768. <correct>
  4769. <element xmlns="http://relaxng.org/ns/structure/1.0">
  4770. <name ns="">foo</name>
  4771. <group>
  4772. <element>
  4773. <name ns="">bar</name>
  4774. <empty/>
  4775. </element>
  4776. <element>
  4777. <name ns="">baz</name>
  4778. <empty/>
  4779. </element>
  4780. </group>
  4781. </element>
  4782. </correct>
  4783. <valid>
  4784. <foo><bar/><baz/></foo>
  4785. </valid>
  4786. <valid>
  4787. <foo>
  4788. <bar/>
  4789. <baz/>
  4790. </foo>
  4791. </valid>
  4792. <valid>
  4793. <foo>
  4794. <bar/>
  4795. &#xD;
  4796. <baz/>
  4797. </foo>
  4798. </valid>
  4799. <invalid>
  4800. <foo/>
  4801. </invalid>
  4802. <invalid>
  4803. <bar><bar/><baz/></bar>
  4804. </invalid>
  4805. </testCase>
  4806. <testCase>
  4807. <section>6.2.7</section>
  4808. <section>6.2.8</section>
  4809. <correct>
  4810. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4811. <value type="string"/>
  4812. </element>
  4813. </correct>
  4814. <valid><foo/></valid>
  4815. <invalid><foo> </foo></invalid>
  4816. <invalid><foo>x</foo></invalid>
  4817. </testCase>
  4818. <testCase>
  4819. <section>6.2.7</section>
  4820. <section>6.2.8</section>
  4821. <correct>
  4822. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4823. <choice>
  4824. <value type="string"/>
  4825. <empty/>
  4826. </choice>
  4827. </element>
  4828. </correct>
  4829. <valid><foo/></valid>
  4830. <valid><foo> </foo></valid>
  4831. <invalid><foo>x</foo></invalid>
  4832. </testCase>
  4833. <testCase>
  4834. <section>6.2.7</section>
  4835. <section>6.2.8</section>
  4836. <section>6.2.10</section>
  4837. <correct>
  4838. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4839. <list>
  4840. <data type="token"/>
  4841. </list>
  4842. </element>
  4843. </correct>
  4844. <invalid><foo/></invalid>
  4845. <invalid><foo> </foo></invalid>
  4846. <valid><foo>x</foo></valid>
  4847. <valid><foo> x </foo></valid>
  4848. <invalid><foo>x y</foo></invalid>
  4849. </testCase>
  4850. <testCase>
  4851. <section>6.2.7</section>
  4852. <section>6.2.8</section>
  4853. <requires datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
  4854. <correct>
  4855. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4856. <data type="string"
  4857. datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  4858. <param name="minLength">2</param>
  4859. </data>
  4860. </element>
  4861. </correct>
  4862. <valid><foo>xx</foo></valid>
  4863. <valid><foo>xxx</foo></valid>
  4864. <valid><foo> </foo></valid>
  4865. <valid><foo> </foo></valid>
  4866. <invalid><foo>x</foo></invalid>
  4867. <invalid><foo> </foo></invalid>
  4868. <invalid><foo/></invalid>
  4869. </testCase>
  4870. <testCase>
  4871. <section>6.2.7</section>
  4872. <section>6.2.8</section>
  4873. <correct>
  4874. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4875. <choice>
  4876. <value>x</value>
  4877. <element name="bar">
  4878. <empty/>
  4879. </element>
  4880. </choice>
  4881. </element>
  4882. </correct>
  4883. <valid><foo> x </foo></valid>
  4884. <valid><foo>x</foo></valid>
  4885. <invalid><foo>y</foo></invalid>
  4886. <valid><foo><bar/></foo></valid>
  4887. <valid>
  4888. <foo>
  4889. <bar/>
  4890. </foo>
  4891. </valid>
  4892. <invalid><foo>x<bar/></foo></invalid>
  4893. <invalid><foo/></invalid>
  4894. <invalid><foo><bar/>x</foo></invalid>
  4895. </testCase>
  4896. <testCase>
  4897. <section>6.2.7</section>
  4898. <section>6.2.8</section>
  4899. <correct>
  4900. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4901. <choice>
  4902. <value>x</value>
  4903. <mixed>
  4904. <element name="bar">
  4905. <empty/>
  4906. </element>
  4907. </mixed>
  4908. </choice>
  4909. </element>
  4910. </correct>
  4911. <valid><foo> x </foo></valid>
  4912. <valid><foo>x</foo></valid>
  4913. <invalid><foo>y</foo></invalid>
  4914. <valid><foo><bar/></foo></valid>
  4915. <valid>
  4916. <foo>
  4917. <bar/>
  4918. </foo>
  4919. </valid>
  4920. <valid><foo>x<bar/></foo></valid>
  4921. <invalid><foo/></invalid>
  4922. <valid><foo><bar/>x</foo></valid>
  4923. </testCase>
  4924. </testSuite>
  4925. <testSuite>
  4926. <section>6.2.8</section>
  4927. <testCase>
  4928. <section>6.2.8</section>
  4929. <correct>
  4930. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4931. <data type="string">
  4932. <except>
  4933. <choice>
  4934. <value>x</value>
  4935. <value>y</value>
  4936. </choice>
  4937. </except>
  4938. </data>
  4939. </element>
  4940. </correct>
  4941. <valid>
  4942. <foo>xyzzy</foo>
  4943. </valid>
  4944. <invalid>
  4945. <foo>x</foo>
  4946. </invalid>
  4947. <invalid>
  4948. <foo>y</foo>
  4949. </invalid>
  4950. <invalid>
  4951. <foo> x</foo>
  4952. </invalid>
  4953. </testCase>
  4954. <testCase>
  4955. <section>6.2.8</section>
  4956. <correct>
  4957. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4958. <data type="string"/>
  4959. </element>
  4960. </correct>
  4961. <valid>
  4962. <foo/>
  4963. </valid>
  4964. </testCase>
  4965. <testCase>
  4966. <section>6.2.8</section>
  4967. <correct>
  4968. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4969. <value/>
  4970. </element>
  4971. </correct>
  4972. <valid>
  4973. <foo/>
  4974. </valid>
  4975. </testCase>
  4976. <testCase>
  4977. <section>6.2.8</section>
  4978. <correct>
  4979. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  4980. <data type="string">
  4981. <except>
  4982. <value/>
  4983. </except>
  4984. </data>
  4985. </element>
  4986. </correct>
  4987. <invalid>
  4988. <foo/>
  4989. </invalid>
  4990. <valid>
  4991. <foo>x</foo>
  4992. </valid>
  4993. </testCase>
  4994. </testSuite>
  4995. <testSuite>
  4996. <section>6.2.9</section>
  4997. <testCase>
  4998. <section>6.2.9</section>
  4999. <correct>
  5000. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5001. <data type="string" datatypeLibrary=""/>
  5002. </element>
  5003. </correct>
  5004. <valid>
  5005. <foo>xyzzy</foo>
  5006. </valid>
  5007. <valid>
  5008. <foo>
  5009. x
  5010. <?target data?>
  5011. y
  5012. <?target data?>
  5013. z
  5014. </foo>
  5015. </valid>
  5016. <valid>
  5017. <foo></foo>
  5018. </valid>
  5019. <valid>
  5020. <foo>
  5021. </foo>
  5022. </valid>
  5023. <invalid>
  5024. <foo><bar/></foo>
  5025. </invalid>
  5026. <invalid>
  5027. <foo bar=""/>
  5028. </invalid>
  5029. </testCase>
  5030. <testCase>
  5031. <section>6.2.9</section>
  5032. <correct>
  5033. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5034. <data type="token" datatypeLibrary=""/>
  5035. </element>
  5036. </correct>
  5037. <valid>
  5038. <foo>xyzzy</foo>
  5039. </valid>
  5040. <valid>
  5041. <foo>
  5042. x
  5043. <?target data?>
  5044. y
  5045. <?target data?>
  5046. z
  5047. </foo>
  5048. </valid>
  5049. <valid>
  5050. <foo></foo>
  5051. </valid>
  5052. <valid>
  5053. <foo>
  5054. </foo>
  5055. </valid>
  5056. <invalid>
  5057. <foo><bar/></foo>
  5058. </invalid>
  5059. <invalid>
  5060. <foo bar=""/>
  5061. </invalid>
  5062. </testCase>
  5063. <testCase>
  5064. <section>6.2.9</section>
  5065. <correct>
  5066. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5067. <value type="string" datatypeLibrary="">x</value>
  5068. </element>
  5069. </correct>
  5070. <valid><foo>x</foo></valid>
  5071. <invalid><foo>xy</foo></invalid>
  5072. <invalid><foo> x</foo></invalid>
  5073. <invalid><foo/></invalid>
  5074. </testCase>
  5075. <testCase>
  5076. <section>6.2.9</section>
  5077. <correct>
  5078. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5079. <value type="string" datatypeLibrary=""> x</value>
  5080. </element>
  5081. </correct>
  5082. <valid><foo> x</foo></valid>
  5083. <invalid><foo> xy</foo></invalid>
  5084. <invalid><foo>x</foo></invalid>
  5085. <invalid><foo/></invalid>
  5086. </testCase>
  5087. <testCase>
  5088. <section>6.2.9</section>
  5089. <correct>
  5090. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5091. <value type="token" datatypeLibrary="">x</value>
  5092. </element>
  5093. </correct>
  5094. <valid><foo>x</foo></valid>
  5095. <valid><foo> x</foo></valid>
  5096. <valid><foo>x </foo></valid>
  5097. <valid><foo>&#xA;&#xD;&#x9;&#x20;x&#xA;&#xD;&#x9;&#x20;</foo></valid>
  5098. <invalid><foo/></invalid>
  5099. <invalid><foo>xy</foo></invalid>
  5100. </testCase>
  5101. <testCase>
  5102. <section>6.2.9</section>
  5103. <correct>
  5104. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5105. <value type="token" datatypeLibrary="">x y</value>
  5106. </element>
  5107. </correct>
  5108. <valid><foo>x y</foo></valid>
  5109. <valid><foo> x y </foo></valid>
  5110. <valid><foo>x&#xA;&#xD;&#x9;&#x20;y</foo></valid>
  5111. <invalid><foo>xy</foo></invalid>
  5112. </testCase>
  5113. <testCase>
  5114. <section>6.2.9</section>
  5115. <correct>
  5116. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5117. <value type="token" datatypeLibrary="">&#xA;&#xD;&#x9;&#x20;x&#xA;&#xD;&#x9;&#x20;</value>
  5118. </element>
  5119. </correct>
  5120. <valid><foo>x</foo></valid>
  5121. <valid><foo> x</foo></valid>
  5122. <valid><foo>x </foo></valid>
  5123. <valid><foo>&#xD;&#x9;x&#x20;&#xA;</foo></valid>
  5124. <invalid><foo/></invalid>
  5125. <invalid><foo>xy</foo></invalid>
  5126. </testCase>
  5127. <testCase>
  5128. <section>6.2.9</section>
  5129. <correct>
  5130. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5131. <value type="token" datatypeLibrary="">x&#xA;&#xD;&#x9;&#x20;y</value>
  5132. </element>
  5133. </correct>
  5134. <valid><foo>x y</foo></valid>
  5135. <valid><foo>x y</foo></valid>
  5136. <valid><foo> x y </foo></valid>
  5137. <valid><foo>x&#xD;&#x9;y</foo></valid>
  5138. <valid><foo>x&#x20;&#xA;y</foo></valid>
  5139. <invalid><foo/></invalid>
  5140. <invalid><foo>xy</foo></invalid>
  5141. </testCase>
  5142. <testCase>
  5143. <section>6.2.9</section>
  5144. <incorrect>
  5145. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5146. <data type="decimal" datatypeLibrary=""/>
  5147. </element>
  5148. </incorrect>
  5149. </testCase>
  5150. <testCase>
  5151. <section>6.2.9</section>
  5152. <incorrect>
  5153. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5154. <value type="decimal" datatypeLibrary=""/>
  5155. </element>
  5156. </incorrect>
  5157. </testCase>
  5158. <testCase>
  5159. <section>6.2.9</section>
  5160. <incorrect>
  5161. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5162. <data type="string" datatypeLibrary="">
  5163. <param name="length">2</param>
  5164. </data>
  5165. </element>
  5166. </incorrect>
  5167. </testCase>
  5168. <testCase>
  5169. <section>6.2.9</section>
  5170. <incorrect>
  5171. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5172. <data type="token" datatypeLibrary="">
  5173. <param name="length">2</param>
  5174. </data>
  5175. </element>
  5176. </incorrect>
  5177. </testCase>
  5178. </testSuite>
  5179. <testSuite>
  5180. <section>6.2.10</section>
  5181. <testCase>
  5182. <section>6.2.10</section>
  5183. <correct>
  5184. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5185. <list>
  5186. <value type="string">x</value>
  5187. </list>
  5188. </element>
  5189. </correct>
  5190. <valid>
  5191. <foo>x</foo>
  5192. </valid>
  5193. <valid>
  5194. <foo> x </foo>
  5195. </valid>
  5196. <invalid>
  5197. <foo>x x</foo>
  5198. </invalid>
  5199. </testCase>
  5200. <testCase>
  5201. <section>6.2.10</section>
  5202. <correct>
  5203. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5204. <list>
  5205. <oneOrMore>
  5206. <value type="string">x</value>
  5207. </oneOrMore>
  5208. </list>
  5209. </element>
  5210. </correct>
  5211. <valid>
  5212. <foo>x</foo>
  5213. </valid>
  5214. <valid>
  5215. <foo> x x x x </foo>
  5216. </valid>
  5217. <invalid>
  5218. <foo/>
  5219. </invalid>
  5220. <invalid>
  5221. <foo>x y</foo>
  5222. </invalid>
  5223. </testCase>
  5224. <testCase>
  5225. <section>6.2.10</section>
  5226. <correct>
  5227. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5228. <list>
  5229. <group>
  5230. <value type="string">x</value>
  5231. <value type="string">y</value>
  5232. </group>
  5233. </list>
  5234. </element>
  5235. </correct>
  5236. <valid>
  5237. <foo>x y</foo>
  5238. </valid>
  5239. <valid>
  5240. <foo>x y</foo>
  5241. </valid>
  5242. <valid>
  5243. <foo>&#xD;x&#xA;y&#x9;</foo>
  5244. </valid>
  5245. <invalid>
  5246. <foo>x</foo>
  5247. </invalid>
  5248. </testCase>
  5249. <testCase>
  5250. <section>6.2.10</section>
  5251. <correct>
  5252. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5253. <list>
  5254. <group>
  5255. <data type="token"/>
  5256. <data type="token"/>
  5257. </group>
  5258. </list>
  5259. </element>
  5260. </correct>
  5261. <valid>
  5262. <foo>x y</foo>
  5263. </valid>
  5264. <invalid>
  5265. <foo/>
  5266. </invalid>
  5267. <invalid>
  5268. <foo>x y z</foo>
  5269. </invalid>
  5270. </testCase>
  5271. <testCase>
  5272. <section>6.2.10</section>
  5273. <correct>
  5274. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  5275. <list>
  5276. <value>x y</value>
  5277. </list>
  5278. </element>
  5279. </correct>
  5280. <invalid>
  5281. <foo>x y</foo>
  5282. </invalid>
  5283. </testCase>
  5284. </testSuite>
  5285. </testSuite>
  5286. </testSuite>
  5287. <testSuite>
  5288. <section>7</section>
  5289. <testSuite>
  5290. <section>7.1</section>
  5291. <testCase>
  5292. <section>7.1.1</section>
  5293. <incorrect>
  5294. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5295. <start>
  5296. <element name="foo">
  5297. <attribute name="bar">
  5298. <element name="baz">
  5299. <empty/>
  5300. </element>
  5301. </attribute>
  5302. </element>
  5303. </start>
  5304. </grammar>
  5305. </incorrect>
  5306. </testCase>
  5307. <testCase>
  5308. <section>7.1.1</section>
  5309. <incorrect>
  5310. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5311. <start>
  5312. <element name="foo">
  5313. <attribute name="bar">
  5314. <choice>
  5315. <element name="baz">
  5316. <empty/>
  5317. </element>
  5318. <text/>
  5319. </choice>
  5320. </attribute>
  5321. </element>
  5322. </start>
  5323. </grammar>
  5324. </incorrect>
  5325. </testCase>
  5326. <testCase>
  5327. <section>7.1.1</section>
  5328. <incorrect>
  5329. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5330. <start>
  5331. <element name="foo">
  5332. <attribute name="bar">
  5333. <attribute name="baz"/>
  5334. </attribute>
  5335. </element>
  5336. </start>
  5337. </grammar>
  5338. </incorrect>
  5339. </testCase>
  5340. <testCase>
  5341. <section>7.1.1</section>
  5342. <incorrect>
  5343. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5344. <start>
  5345. <element name="foo">
  5346. <attribute name="bar">
  5347. <choice>
  5348. <attribute name="baz"/>
  5349. <text/>
  5350. </choice>
  5351. </attribute>
  5352. </element>
  5353. </start>
  5354. </grammar>
  5355. </incorrect>
  5356. </testCase>
  5357. <testCase>
  5358. <section>7.1.2</section>
  5359. <incorrect>
  5360. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5361. <start>
  5362. <element name="foo">
  5363. <oneOrMore>
  5364. <group>
  5365. <attribute name="bar"/>
  5366. <attribute name="baz"/>
  5367. </group>
  5368. </oneOrMore>
  5369. </element>
  5370. </start>
  5371. </grammar>
  5372. </incorrect>
  5373. </testCase>
  5374. <testCase>
  5375. <section>7.1.2</section>
  5376. <incorrect>
  5377. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5378. <start>
  5379. <element name="foo">
  5380. <oneOrMore>
  5381. <group>
  5382. <attribute>
  5383. <anyName/>
  5384. </attribute>
  5385. <attribute>
  5386. <anyName/>
  5387. </attribute>
  5388. </group>
  5389. </oneOrMore>
  5390. </element>
  5391. </start>
  5392. </grammar>
  5393. </incorrect>
  5394. </testCase>
  5395. <testCase>
  5396. <section>7.1.2</section>
  5397. <incorrect>
  5398. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5399. <start>
  5400. <element name="foo">
  5401. <oneOrMore>
  5402. <choice>
  5403. <group>
  5404. <choice>
  5405. <attribute name="bar"/>
  5406. <attribute name="baz"/>
  5407. </choice>
  5408. <choice>
  5409. <attribute name="bar"/>
  5410. <attribute name="baz"/>
  5411. </choice>
  5412. </group>
  5413. <attribute name="bar"/>
  5414. </choice>
  5415. </oneOrMore>
  5416. </element>
  5417. </start>
  5418. </grammar>
  5419. </incorrect>
  5420. </testCase>
  5421. <testCase>
  5422. <section>7.1.2</section>
  5423. <incorrect>
  5424. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5425. <start>
  5426. <element name="foo">
  5427. <oneOrMore>
  5428. <interleave>
  5429. <attribute name="bar"/>
  5430. <attribute name="baz"/>
  5431. </interleave>
  5432. </oneOrMore>
  5433. </element>
  5434. </start>
  5435. </grammar>
  5436. </incorrect>
  5437. </testCase>
  5438. <testCase>
  5439. <section>7.1.2</section>
  5440. <incorrect>
  5441. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5442. <start>
  5443. <element name="foo">
  5444. <oneOrMore>
  5445. <interleave>
  5446. <attribute>
  5447. <anyName/>
  5448. </attribute>
  5449. <attribute>
  5450. <anyName/>
  5451. </attribute>
  5452. </interleave>
  5453. </oneOrMore>
  5454. </element>
  5455. </start>
  5456. </grammar>
  5457. </incorrect>
  5458. </testCase>
  5459. <testCase>
  5460. <section>7.1.2</section>
  5461. <incorrect>
  5462. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5463. <start>
  5464. <element name="foo">
  5465. <oneOrMore>
  5466. <choice>
  5467. <interleave>
  5468. <choice>
  5469. <attribute name="bar"/>
  5470. <attribute name="baz"/>
  5471. </choice>
  5472. <choice>
  5473. <attribute name="bar"/>
  5474. <attribute name="baz"/>
  5475. </choice>
  5476. </interleave>
  5477. <attribute name="bar"/>
  5478. </choice>
  5479. </oneOrMore>
  5480. </element>
  5481. </start>
  5482. </grammar>
  5483. </incorrect>
  5484. </testCase>
  5485. <testCase>
  5486. <section>7.1.3</section>
  5487. <incorrect>
  5488. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5489. <start>
  5490. <element name="foo">
  5491. <list>
  5492. <list>
  5493. <data type="token"/>
  5494. </list>
  5495. </list>
  5496. </element>
  5497. </start>
  5498. </grammar>
  5499. </incorrect>
  5500. </testCase>
  5501. <testCase>
  5502. <section>7.1.3</section>
  5503. <incorrect>
  5504. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5505. <start>
  5506. <element name="foo">
  5507. <list>
  5508. <choice>
  5509. <list>
  5510. <data type="token"/>
  5511. </list>
  5512. <data type="token"/>
  5513. </choice>
  5514. </list>
  5515. </element>
  5516. </start>
  5517. </grammar>
  5518. </incorrect>
  5519. </testCase>
  5520. <testCase>
  5521. <section>7.1.3</section>
  5522. <incorrect>
  5523. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5524. <start>
  5525. <element name="foo">
  5526. <list>
  5527. <element name="bar">
  5528. <empty/>
  5529. </element>
  5530. </list>
  5531. </element>
  5532. </start>
  5533. </grammar>
  5534. </incorrect>
  5535. </testCase>
  5536. <testCase>
  5537. <section>7.1.3</section>
  5538. <incorrect>
  5539. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5540. <start>
  5541. <element name="foo">
  5542. <list>
  5543. <choice>
  5544. <data type="token"/>
  5545. <element name="bar">
  5546. <empty/>
  5547. </element>
  5548. </choice>
  5549. </list>
  5550. </element>
  5551. </start>
  5552. </grammar>
  5553. </incorrect>
  5554. </testCase>
  5555. <testCase>
  5556. <section>7.1.3</section>
  5557. <incorrect>
  5558. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5559. <start>
  5560. <element name="foo">
  5561. <list>
  5562. <attribute name="bar">
  5563. <empty/>
  5564. </attribute>
  5565. </list>
  5566. </element>
  5567. </start>
  5568. </grammar>
  5569. </incorrect>
  5570. </testCase>
  5571. <testCase>
  5572. <section>7.1.3</section>
  5573. <incorrect>
  5574. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5575. <start>
  5576. <element name="foo">
  5577. <list>
  5578. <choice>
  5579. <attribute name="bar">
  5580. <empty/>
  5581. </attribute>
  5582. <data type="token"/>
  5583. </choice>
  5584. </list>
  5585. </element>
  5586. </start>
  5587. </grammar>
  5588. </incorrect>
  5589. </testCase>
  5590. <testCase>
  5591. <section>7.1.3</section>
  5592. <incorrect>
  5593. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5594. <start>
  5595. <element name="foo">
  5596. <list>
  5597. <choice>
  5598. <text/>
  5599. <data type="token"/>
  5600. </choice>
  5601. </list>
  5602. </element>
  5603. </start>
  5604. </grammar>
  5605. </incorrect>
  5606. </testCase>
  5607. <testCase>
  5608. <section>7.1.3</section>
  5609. <incorrect>
  5610. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5611. <start>
  5612. <element name="foo">
  5613. <list>
  5614. <interleave>
  5615. <value>x</value>
  5616. <value>y</value>
  5617. </interleave>
  5618. </list>
  5619. </element>
  5620. </start>
  5621. </grammar>
  5622. </incorrect>
  5623. </testCase>
  5624. <testCase>
  5625. <section>7.1.3</section>
  5626. <incorrect>
  5627. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5628. <start>
  5629. <element name="foo">
  5630. <list>
  5631. <choice>
  5632. <interleave>
  5633. <value>x</value>
  5634. <value>y</value>
  5635. </interleave>
  5636. <value>z</value>
  5637. </choice>
  5638. </list>
  5639. </element>
  5640. </start>
  5641. </grammar>
  5642. </incorrect>
  5643. </testCase>
  5644. <testCase>
  5645. <section>7.1.4</section>
  5646. <incorrect>
  5647. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5648. <start>
  5649. <element name="foo">
  5650. <data type="string">
  5651. <except>
  5652. <attribute name="bar"/>
  5653. </except>
  5654. </data>
  5655. </element>
  5656. </start>
  5657. </grammar>
  5658. </incorrect>
  5659. </testCase>
  5660. <testCase>
  5661. <section>7.1.4</section>
  5662. <incorrect>
  5663. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5664. <start>
  5665. <element name="foo">
  5666. <data type="string">
  5667. <except>
  5668. <element name="bar">
  5669. <empty/>
  5670. </element>
  5671. </except>
  5672. </data>
  5673. </element>
  5674. </start>
  5675. </grammar>
  5676. </incorrect>
  5677. </testCase>
  5678. <testCase>
  5679. <section>7.1.4</section>
  5680. <incorrect>
  5681. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5682. <start>
  5683. <element name="foo">
  5684. <data type="string">
  5685. <except>
  5686. <text/>
  5687. </except>
  5688. </data>
  5689. </element>
  5690. </start>
  5691. </grammar>
  5692. </incorrect>
  5693. </testCase>
  5694. <testCase>
  5695. <section>7.1.4</section>
  5696. <incorrect>
  5697. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5698. <start>
  5699. <element name="foo">
  5700. <data type="string">
  5701. <except>
  5702. <list>
  5703. <data type="token"/>
  5704. </list>
  5705. </except>
  5706. </data>
  5707. </element>
  5708. </start>
  5709. </grammar>
  5710. </incorrect>
  5711. </testCase>
  5712. <testCase>
  5713. <section>7.1.4</section>
  5714. <incorrect>
  5715. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5716. <start>
  5717. <element name="foo">
  5718. <data type="string">
  5719. <except>
  5720. <group>
  5721. <data type="token"/>
  5722. <data type="token"/>
  5723. </group>
  5724. </except>
  5725. </data>
  5726. </element>
  5727. </start>
  5728. </grammar>
  5729. </incorrect>
  5730. </testCase>
  5731. <testCase>
  5732. <section>7.1.4</section>
  5733. <incorrect>
  5734. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5735. <start>
  5736. <element name="foo">
  5737. <data type="string">
  5738. <except>
  5739. <interleave>
  5740. <data type="token"/>
  5741. <data type="token"/>
  5742. </interleave>
  5743. </except>
  5744. </data>
  5745. </element>
  5746. </start>
  5747. </grammar>
  5748. </incorrect>
  5749. </testCase>
  5750. <testCase>
  5751. <section>7.1.4</section>
  5752. <incorrect>
  5753. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5754. <start>
  5755. <element name="foo">
  5756. <data type="string">
  5757. <except>
  5758. <oneOrMore>
  5759. <data type="token"/>
  5760. </oneOrMore>
  5761. </except>
  5762. </data>
  5763. </element>
  5764. </start>
  5765. </grammar>
  5766. </incorrect>
  5767. </testCase>
  5768. <testCase>
  5769. <section>7.1.4</section>
  5770. <incorrect>
  5771. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5772. <start>
  5773. <element name="foo">
  5774. <data type="string">
  5775. <except>
  5776. <empty/>
  5777. </except>
  5778. </data>
  5779. </element>
  5780. </start>
  5781. </grammar>
  5782. </incorrect>
  5783. </testCase>
  5784. <testCase>
  5785. <section>7.1.5</section>
  5786. <incorrect>
  5787. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5788. <start>
  5789. <attribute name="foo"/>
  5790. </start>
  5791. </grammar>
  5792. </incorrect>
  5793. </testCase>
  5794. <testCase>
  5795. <section>7.1.5</section>
  5796. <incorrect>
  5797. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5798. <start>
  5799. <data type="string"/>
  5800. </start>
  5801. </grammar>
  5802. </incorrect>
  5803. </testCase>
  5804. <testCase>
  5805. <section>7.1.5</section>
  5806. <incorrect>
  5807. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5808. <start>
  5809. <choice>
  5810. <data type="string"/>
  5811. <element name="foo">
  5812. <empty/>
  5813. </element>
  5814. </choice>
  5815. </start>
  5816. </grammar>
  5817. </incorrect>
  5818. </testCase>
  5819. <testCase>
  5820. <section>7.1.5</section>
  5821. <incorrect>
  5822. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5823. <start>
  5824. <choice>
  5825. <value>foo</value>
  5826. <element name="foo">
  5827. <empty/>
  5828. </element>
  5829. </choice>
  5830. </start>
  5831. </grammar>
  5832. </incorrect>
  5833. </testCase>
  5834. <testCase>
  5835. <section>7.1.5</section>
  5836. <incorrect>
  5837. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5838. <start>
  5839. <text/>
  5840. </start>
  5841. </grammar>
  5842. </incorrect>
  5843. </testCase>
  5844. <testCase>
  5845. <section>7.1.5</section>
  5846. <incorrect>
  5847. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5848. <start>
  5849. <choice>
  5850. <text/>
  5851. <element name="foo">
  5852. <empty/>
  5853. </element>
  5854. </choice>
  5855. </start>
  5856. </grammar>
  5857. </incorrect>
  5858. </testCase>
  5859. <testCase>
  5860. <section>7.1.5</section>
  5861. <incorrect>
  5862. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5863. <start>
  5864. <list>
  5865. <data type="token"/>
  5866. </list>
  5867. </start>
  5868. </grammar>
  5869. </incorrect>
  5870. </testCase>
  5871. <testCase>
  5872. <section>7.1.5</section>
  5873. <incorrect>
  5874. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5875. <start>
  5876. <choice>
  5877. <element name="foo">
  5878. <empty/>
  5879. </element>
  5880. <list>
  5881. <data type="token"/>
  5882. </list>
  5883. </choice>
  5884. </start>
  5885. </grammar>
  5886. </incorrect>
  5887. </testCase>
  5888. <testCase>
  5889. <section>7.1.5</section>
  5890. <incorrect>
  5891. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5892. <start>
  5893. <group>
  5894. <element name="foo">
  5895. <empty/>
  5896. </element>
  5897. <element name="foo">
  5898. <empty/>
  5899. </element>
  5900. </group>
  5901. </start>
  5902. </grammar>
  5903. </incorrect>
  5904. </testCase>
  5905. <testCase>
  5906. <section>7.1.5</section>
  5907. <incorrect>
  5908. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5909. <start>
  5910. <choice>
  5911. <element name="foo">
  5912. <empty/>
  5913. </element>
  5914. <group>
  5915. <element name="foo">
  5916. <empty/>
  5917. </element>
  5918. <element name="foo">
  5919. <empty/>
  5920. </element>
  5921. </group>
  5922. </choice>
  5923. </start>
  5924. </grammar>
  5925. </incorrect>
  5926. </testCase>
  5927. <testCase>
  5928. <section>7.1.5</section>
  5929. <incorrect>
  5930. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5931. <start>
  5932. <interleave>
  5933. <element name="foo">
  5934. <empty/>
  5935. </element>
  5936. <element name="foo">
  5937. <empty/>
  5938. </element>
  5939. </interleave>
  5940. </start>
  5941. </grammar>
  5942. </incorrect>
  5943. </testCase>
  5944. <testCase>
  5945. <section>7.1.5</section>
  5946. <incorrect>
  5947. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5948. <start>
  5949. <choice>
  5950. <element name="foo">
  5951. <empty/>
  5952. </element>
  5953. <interleave>
  5954. <element name="foo">
  5955. <empty/>
  5956. </element>
  5957. <element name="foo">
  5958. <empty/>
  5959. </element>
  5960. </interleave>
  5961. </choice>
  5962. </start>
  5963. </grammar>
  5964. </incorrect>
  5965. </testCase>
  5966. <testCase>
  5967. <section>7.1.5</section>
  5968. <incorrect>
  5969. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5970. <start>
  5971. <oneOrMore>
  5972. <element name="foo">
  5973. <empty/>
  5974. </element>
  5975. </oneOrMore>
  5976. </start>
  5977. </grammar>
  5978. </incorrect>
  5979. </testCase>
  5980. <testCase>
  5981. <section>7.1.5</section>
  5982. <incorrect>
  5983. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  5984. <start>
  5985. <choice>
  5986. <oneOrMore>
  5987. <element name="foo">
  5988. <empty/>
  5989. </element>
  5990. </oneOrMore>
  5991. <element name="foo">
  5992. <empty/>
  5993. </element>
  5994. </choice>
  5995. </start>
  5996. </grammar>
  5997. </incorrect>
  5998. </testCase>
  5999. <testCase>
  6000. <section>7.1.5</section>
  6001. <incorrect>
  6002. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  6003. <start>
  6004. <empty/>
  6005. </start>
  6006. </grammar>
  6007. </incorrect>
  6008. </testCase>
  6009. <testCase>
  6010. <section>7.1.5</section>
  6011. <incorrect>
  6012. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  6013. <start>
  6014. <choice>
  6015. <element name="foo">
  6016. <empty/>
  6017. </element>
  6018. <empty/>
  6019. </choice>
  6020. </start>
  6021. </grammar>
  6022. </incorrect>
  6023. </testCase>
  6024. <testCase>
  6025. <section>7.1.5</section>
  6026. <section>7</section>
  6027. <section>4.18</section>
  6028. <documentation>Tests that constraints are post-normalization</documentation>
  6029. <correct>
  6030. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  6031. <grammar>
  6032. <start>
  6033. <text/>
  6034. </start>
  6035. </grammar>
  6036. </element>
  6037. </correct>
  6038. <valid>
  6039. <foo>text</foo>
  6040. </valid>
  6041. </testCase>
  6042. <testCase>
  6043. <section>7.1.5</section>
  6044. <section>7</section>
  6045. <section>4.18</section>
  6046. <incorrect>
  6047. <text xmlns="http://relaxng.org/ns/structure/1.0"/>
  6048. </incorrect>
  6049. </testCase>
  6050. <testCase>
  6051. <section>7.1.1</section>
  6052. <section>7</section>
  6053. <section>4.20</section>
  6054. <correct>
  6055. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  6056. <optional>
  6057. <attribute name="bar">
  6058. <group>
  6059. <notAllowed/>
  6060. <attribute name="baz"/>
  6061. </group>
  6062. </attribute>
  6063. </optional>
  6064. </element>
  6065. </correct>
  6066. <valid>
  6067. <foo/>
  6068. </valid>
  6069. </testCase>
  6070. <testCase>
  6071. <section>7.1.1</section>
  6072. <section>7</section>
  6073. <section>4.20</section>
  6074. <documentation>The nested attribute element is normalized out because
  6075. of the not allowed.</documentation>
  6076. <correct>
  6077. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  6078. <attribute name="bar">
  6079. <choice>
  6080. <text/>
  6081. <group>
  6082. <notAllowed/>
  6083. <attribute name="baz"/>
  6084. </group>
  6085. </choice>
  6086. </attribute>
  6087. </element>
  6088. </correct>
  6089. <valid>
  6090. <foo bar="baz"/>
  6091. </valid>
  6092. </testCase>
  6093. <testCase>
  6094. <section>7.1.2</section>
  6095. <section>7</section>
  6096. <section>4.12</section>
  6097. <documentation>The group element is normalized out.</documentation>
  6098. <correct>
  6099. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  6100. <start>
  6101. <element name="foo">
  6102. <oneOrMore>
  6103. <group>
  6104. <attribute>
  6105. <anyName/>
  6106. </attribute>
  6107. </group>
  6108. </oneOrMore>
  6109. </element>
  6110. </start>
  6111. </grammar>
  6112. </correct>
  6113. <valid>
  6114. <foo xyzzy1="val1" xyzzy2="val2"/>
  6115. </valid>
  6116. </testCase>
  6117. <testCase>
  6118. <section>7.1.2</section>
  6119. <section>7</section>
  6120. <section>4.21</section>
  6121. <documentation>The group element is normalized out.</documentation>
  6122. <correct>
  6123. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  6124. <start>
  6125. <element name="foo">
  6126. <oneOrMore>
  6127. <group>
  6128. <attribute>
  6129. <anyName/>
  6130. </attribute>
  6131. <empty/>
  6132. </group>
  6133. </oneOrMore>
  6134. </element>
  6135. </start>
  6136. </grammar>
  6137. </correct>
  6138. <valid>
  6139. <foo xyzzy1="val1" xyzzy2="val2"/>
  6140. </valid>
  6141. </testCase>
  6142. <testCase>
  6143. <section>7.1.2</section>
  6144. <section>7</section>
  6145. <section>4.20</section>
  6146. <documentation>The attribute elements are all normalized out.</documentation>
  6147. <correct>
  6148. <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
  6149. <optional>
  6150. <attribute name="a1">
  6151. <attribute name="a2">
  6152. <attribute name="a3">
  6153. <notAllowed/>
  6154. </attribute>
  6155. </attribute>
  6156. </attribute>
  6157. </optional>
  6158. </element>
  6159. </correct>
  6160. <valid>
  6161. <foo/>
  6162. </valid>
  6163. </testCase>
  6164. </testSuite>
  6165. <testSuite>
  6166. <section>7.2</section>
  6167. <testCase>
  6168. <section>7.2</section>
  6169. <incorrect>
  6170. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  6171. <start>
  6172. <element name="foo">
  6173. <group>
  6174. <data type="token"/>
  6175. <data type="token"/>
  6176. </group>
  6177. </element>
  6178. </start>
  6179. </grammar>
  6180. </incorrect>
  6181. </testCase>
  6182. <testCase>
  6183. <documentation>Checks that normalization of notAllowed happens
  6184. before string sequence checking.</documentation>
  6185. <section>7.2</section>
  6186. <section>4.20</section>
  6187. <correct>
  6188. <choice xmlns="http://relaxng.org/ns/structure/1.0">
  6189. <element name="foo">
  6190. <empty/>
  6191. </element>
  6192. <group>
  6193. <notAllowed/>
  6194. <element name="bar">
  6195. <group>
  6196. <data type="token"/>
  6197. <data type="token"/>
  6198. </group>
  6199. </element>
  6200. </group>
  6201. </choice>
  6202. </correct>
  6203. <valid>
  6204. <foo/>
  6205. </valid>
  6206. </testCase>
  6207. <testCase>
  6208. <section>4.20</section>
  6209. <section>7.2</section>
  6210. <documentation>notAllowed in an element is not normalized</documentation>
  6211. <incorrect>
  6212. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6213. <choice>
  6214. <group>
  6215. <element name="bar">
  6216. <notAllowed/>
  6217. </element>
  6218. <data type="token"/>
  6219. <data type="token"/>
  6220. </group>
  6221. <element name="baz">
  6222. <empty/>
  6223. </element>
  6224. </choice>
  6225. </element>
  6226. </incorrect>
  6227. </testCase>
  6228. </testSuite>
  6229. <testSuite>
  6230. <section>7.3</section>
  6231. <testCase>
  6232. <section>7.3</section>
  6233. <incorrect>
  6234. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6235. <attribute name="bar"/>
  6236. <attribute name="bar"/>
  6237. </element>
  6238. </incorrect>
  6239. </testCase>
  6240. <testCase>
  6241. <section>7.3</section>
  6242. <incorrect>
  6243. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6244. <attribute name="bar"/>
  6245. <zeroOrMore>
  6246. <attribute name="bar"/>
  6247. </zeroOrMore>
  6248. </element>
  6249. </incorrect>
  6250. </testCase>
  6251. <testCase>
  6252. <section>7.3</section>
  6253. <correct>
  6254. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6255. <oneOrMore>
  6256. <attribute name="bar"/>
  6257. </oneOrMore>
  6258. </element>
  6259. </correct>
  6260. <valid>
  6261. <foo bar="xx"/>
  6262. </valid>
  6263. </testCase>
  6264. <testCase>
  6265. <section>7.3</section>
  6266. <incorrect>
  6267. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6268. <interleave>
  6269. <attribute name="bar"/>
  6270. <attribute name="bar"/>
  6271. </interleave>
  6272. </element>
  6273. </incorrect>
  6274. </testCase>
  6275. <testCase>
  6276. <section>7.3</section>
  6277. <incorrect>
  6278. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6279. <optional>
  6280. <attribute name="bar"/>
  6281. </optional>
  6282. <optional>
  6283. <attribute name="bar"/>
  6284. </optional>
  6285. </element>
  6286. </incorrect>
  6287. </testCase>
  6288. <testCase>
  6289. <section>7.3</section>
  6290. <incorrect>
  6291. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6292. <attribute name="bar"/>
  6293. <oneOrMore>
  6294. <attribute>
  6295. <anyName/>
  6296. </attribute>
  6297. </oneOrMore>
  6298. </element>
  6299. </incorrect>
  6300. </testCase>
  6301. <testCase>
  6302. <section>7.3</section>
  6303. <incorrect>
  6304. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6305. <attribute name="bar"/>
  6306. <oneOrMore>
  6307. <attribute>
  6308. <anyName>
  6309. <except>
  6310. <name>baz</name>
  6311. </except>
  6312. </anyName>
  6313. </attribute>
  6314. </oneOrMore>
  6315. </element>
  6316. </incorrect>
  6317. </testCase>
  6318. <testCase>
  6319. <section>7.3</section>
  6320. <correct>
  6321. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6322. <attribute name="bar"/>
  6323. <oneOrMore>
  6324. <attribute>
  6325. <anyName>
  6326. <except>
  6327. <name>bar</name>
  6328. </except>
  6329. </anyName>
  6330. </attribute>
  6331. </oneOrMore>
  6332. </element>
  6333. </correct>
  6334. <valid>
  6335. <foo bar="val" xyzzy="anotherval"/>
  6336. </valid>
  6337. <valid>
  6338. <foo bar="val" baz=""/>
  6339. </valid>
  6340. <invalid>
  6341. <foo bar="val"/>
  6342. </invalid>
  6343. <invalid>
  6344. <foo/>
  6345. </invalid>
  6346. <invalid>
  6347. <foo xyzzy="val"/>
  6348. </invalid>
  6349. </testCase>
  6350. <testCase>
  6351. <section>7.3</section>
  6352. <incorrect>
  6353. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6354. <attribute name="bar"/>
  6355. <oneOrMore>
  6356. <attribute>
  6357. <nsName ns=""/>
  6358. </attribute>
  6359. </oneOrMore>
  6360. </element>
  6361. </incorrect>
  6362. </testCase>
  6363. <testCase>
  6364. <section>7.3</section>
  6365. <incorrect>
  6366. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6367. <attribute name="bar"/>
  6368. <oneOrMore>
  6369. <attribute>
  6370. <nsName ns="">
  6371. <except>
  6372. <name>baz</name>
  6373. </except>
  6374. </nsName>
  6375. </attribute>
  6376. </oneOrMore>
  6377. </element>
  6378. </incorrect>
  6379. </testCase>
  6380. <testCase>
  6381. <section>7.3</section>
  6382. <incorrect>
  6383. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6384. <oneOrMore>
  6385. <attribute>
  6386. <anyName/>
  6387. </attribute>
  6388. </oneOrMore>
  6389. <oneOrMore>
  6390. <attribute>
  6391. <nsName ns=""/>
  6392. </attribute>
  6393. </oneOrMore>
  6394. </element>
  6395. </incorrect>
  6396. </testCase>
  6397. <testCase>
  6398. <section>7.3</section>
  6399. <incorrect>
  6400. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6401. <oneOrMore>
  6402. <attribute>
  6403. <anyName/>
  6404. </attribute>
  6405. </oneOrMore>
  6406. <oneOrMore>
  6407. <attribute>
  6408. <anyName/>
  6409. </attribute>
  6410. </oneOrMore>
  6411. </element>
  6412. </incorrect>
  6413. </testCase>
  6414. <testCase>
  6415. <section>7.3</section>
  6416. <incorrect>
  6417. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6418. <oneOrMore>
  6419. <attribute>
  6420. <nsName ns=""/>
  6421. </attribute>
  6422. </oneOrMore>
  6423. <oneOrMore>
  6424. <attribute>
  6425. <nsName ns="">
  6426. <except>
  6427. <name>bar</name>
  6428. </except>
  6429. </nsName>
  6430. </attribute>
  6431. </oneOrMore>
  6432. </element>
  6433. </incorrect>
  6434. </testCase>
  6435. <testCase>
  6436. <section>7.3</section>
  6437. <incorrect>
  6438. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6439. <oneOrMore>
  6440. <attribute>
  6441. <anyName>
  6442. <except>
  6443. <nsName>
  6444. <except>
  6445. <name>foo</name>
  6446. </except>
  6447. </nsName>
  6448. </except>
  6449. </anyName>
  6450. </attribute>
  6451. </oneOrMore>
  6452. <attribute name="foo"/>
  6453. </element>
  6454. </incorrect>
  6455. </testCase>
  6456. <testCase>
  6457. <section>7.3</section>
  6458. <incorrect>
  6459. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6460. <oneOrMore>
  6461. <attribute>
  6462. <anyName>
  6463. <except>
  6464. <nsName>
  6465. <except>
  6466. <name>foo</name>
  6467. </except>
  6468. </nsName>
  6469. </except>
  6470. </anyName>
  6471. </attribute>
  6472. </oneOrMore>
  6473. <oneOrMore>
  6474. <attribute>
  6475. <nsName/>
  6476. </attribute>
  6477. </oneOrMore>
  6478. </element>
  6479. </incorrect>
  6480. </testCase>
  6481. <testCase>
  6482. <section>7.3</section>
  6483. <correct>
  6484. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6485. <oneOrMore>
  6486. <attribute>
  6487. <anyName>
  6488. <except>
  6489. <nsName>
  6490. <except>
  6491. <name>bar</name>
  6492. </except>
  6493. </nsName>
  6494. </except>
  6495. </anyName>
  6496. </attribute>
  6497. </oneOrMore>
  6498. <attribute name="baz"/>
  6499. </element>
  6500. </correct>
  6501. <valid>
  6502. <foo bar="xx" baz="yy"/>
  6503. </valid>
  6504. <invalid>
  6505. <foo x="xx" baz="yy"/>
  6506. </invalid>
  6507. <valid>
  6508. <foo xmlns:eg="http://www.example.com/" eg:x="xx" baz="yy"/>
  6509. </valid>
  6510. </testCase>
  6511. <testCase>
  6512. <section>7.3</section>
  6513. <correct>
  6514. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6515. <oneOrMore>
  6516. <attribute>
  6517. <nsName ns="http://www.example.com/1"/>
  6518. </attribute>
  6519. </oneOrMore>
  6520. <oneOrMore>
  6521. <attribute>
  6522. <nsName ns="http://www.example.com/2"/>
  6523. </attribute>
  6524. </oneOrMore>
  6525. </element>
  6526. </correct>
  6527. <valid>
  6528. <foo xmlns:eg1="http://www.example.com/1"
  6529. xmlns:eg2="http://www.example.com/2"
  6530. eg1:x="xx" eg2:y="yy"/>
  6531. </valid>
  6532. </testCase>
  6533. <testCase>
  6534. <section>7.3</section>
  6535. <correct>
  6536. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6537. <choice>
  6538. <attribute name="bar"/>
  6539. <attribute name="bar"/>
  6540. </choice>
  6541. </element>
  6542. </correct>
  6543. <valid>
  6544. <foo bar="xx"/>
  6545. </valid>
  6546. </testCase>
  6547. <testCase>
  6548. <section>7.3</section>
  6549. <incorrect>
  6550. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6551. <attribute name="bar"/>
  6552. <choice>
  6553. <attribute name="baz"/>
  6554. <attribute name="bar"/>
  6555. </choice>
  6556. </element>
  6557. </incorrect>
  6558. </testCase>
  6559. <testCase>
  6560. <section>7.3</section>
  6561. <incorrect>
  6562. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6563. <attribute><anyName/><text/></attribute>
  6564. </element>
  6565. </incorrect>
  6566. </testCase>
  6567. <testCase>
  6568. <section>7.3</section>
  6569. <incorrect>
  6570. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6571. <attribute><nsName ns =""/><text/></attribute>
  6572. </element>
  6573. </incorrect>
  6574. </testCase>
  6575. <testCase>
  6576. <section>7.3</section>
  6577. <incorrect>
  6578. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6579. <attribute><choice><nsName ns =""/><name>foo</name></choice><text/></attribute>
  6580. </element>
  6581. </incorrect>
  6582. </testCase>
  6583. </testSuite>
  6584. <testSuite>
  6585. <section>7.4</section>
  6586. <testCase>
  6587. <section>7.4</section>
  6588. <incorrect>
  6589. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6590. <interleave>
  6591. <element name="bar">
  6592. <empty/>
  6593. </element>
  6594. <element name="bar">
  6595. <empty/>
  6596. </element>
  6597. </interleave>
  6598. </element>
  6599. </incorrect>
  6600. </testCase>
  6601. <testCase>
  6602. <section>7.4</section>
  6603. <incorrect>
  6604. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6605. <interleave>
  6606. <element name="bar">
  6607. <empty/>
  6608. </element>
  6609. <interleave>
  6610. <element name="baz">
  6611. <empty/>
  6612. </element>
  6613. <element name="bar">
  6614. <empty/>
  6615. </element>
  6616. </interleave>
  6617. </interleave>
  6618. </element>
  6619. </incorrect>
  6620. </testCase>
  6621. <testCase>
  6622. <section>7.4</section>
  6623. <incorrect>
  6624. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6625. <interleave>
  6626. <element name="bar">
  6627. <empty/>
  6628. </element>
  6629. <group>
  6630. <element name="baz">
  6631. <empty/>
  6632. </element>
  6633. <element name="bar">
  6634. <empty/>
  6635. </element>
  6636. </group>
  6637. </interleave>
  6638. </element>
  6639. </incorrect>
  6640. </testCase>
  6641. <testCase>
  6642. <section>7.4</section>
  6643. <incorrect>
  6644. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6645. <interleave>
  6646. <element name="bar">
  6647. <empty/>
  6648. </element>
  6649. <group>
  6650. <element name="baz">
  6651. <empty/>
  6652. </element>
  6653. <interleave>
  6654. <element name="baz">
  6655. <empty/>
  6656. </element>
  6657. <element name="bar">
  6658. <empty/>
  6659. </element>
  6660. </interleave>
  6661. </group>
  6662. </interleave>
  6663. </element>
  6664. </incorrect>
  6665. </testCase>
  6666. <testCase>
  6667. <section>7.4</section>
  6668. <incorrect>
  6669. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6670. <interleave>
  6671. <element name="bar">
  6672. <empty/>
  6673. </element>
  6674. <optional>
  6675. <element name="bar">
  6676. <empty/>
  6677. </element>
  6678. </optional>
  6679. </interleave>
  6680. </element>
  6681. </incorrect>
  6682. </testCase>
  6683. <testCase>
  6684. <section>7.4</section>
  6685. <incorrect>
  6686. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6687. <interleave>
  6688. <element name="bar">
  6689. <empty/>
  6690. </element>
  6691. <element>
  6692. <nsName ns=""/>
  6693. <empty/>
  6694. </element>
  6695. </interleave>
  6696. </element>
  6697. </incorrect>
  6698. </testCase>
  6699. <testCase>
  6700. <section>7.4</section>
  6701. <incorrect>
  6702. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6703. <interleave>
  6704. <element name="bar">
  6705. <empty/>
  6706. </element>
  6707. <element>
  6708. <anyName/>
  6709. <empty/>
  6710. </element>
  6711. </interleave>
  6712. </element>
  6713. </incorrect>
  6714. </testCase>
  6715. <testCase>
  6716. <section>7.4</section>
  6717. <incorrect>
  6718. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6719. <interleave>
  6720. <element name="bar">
  6721. <empty/>
  6722. </element>
  6723. <element name="bar">
  6724. <notAllowed/>
  6725. </element>
  6726. </interleave>
  6727. </element>
  6728. </incorrect>
  6729. </testCase>
  6730. <testCase>
  6731. <section>7.4</section>
  6732. <correct>
  6733. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6734. <interleave>
  6735. <element name="bar">
  6736. <empty/>
  6737. </element>
  6738. <element>
  6739. <anyName>
  6740. <except>
  6741. <name>bar</name>
  6742. </except>
  6743. </anyName>
  6744. <empty/>
  6745. </element>
  6746. </interleave>
  6747. </element>
  6748. </correct>
  6749. <valid>
  6750. <foo><bar/><baz/></foo>
  6751. </valid>
  6752. </testCase>
  6753. <testCase>
  6754. <section>7.4</section>
  6755. <correct>
  6756. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6757. <interleave>
  6758. <choice>
  6759. <element name="bar">
  6760. <empty/>
  6761. </element>
  6762. <element name="bar">
  6763. <text/>
  6764. </element>
  6765. </choice>
  6766. <element name="baz">
  6767. <empty/>
  6768. </element>
  6769. </interleave>
  6770. </element>
  6771. </correct>
  6772. <valid>
  6773. <foo><bar/><baz/></foo>
  6774. </valid>
  6775. </testCase>
  6776. <testCase>
  6777. <section>7.4</section>
  6778. <incorrect>
  6779. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6780. <interleave>
  6781. <text/>
  6782. <text/>
  6783. </interleave>
  6784. </element>
  6785. </incorrect>
  6786. </testCase>
  6787. <testCase>
  6788. <section>7.4</section>
  6789. <incorrect>
  6790. <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">
  6791. <mixed>
  6792. <mixed>
  6793. <element name="bar">
  6794. <empty/>
  6795. </element>
  6796. </mixed>
  6797. <element name="baz">
  6798. <empty/>
  6799. </element>
  6800. </mixed>
  6801. </element>
  6802. </incorrect>
  6803. </testCase>
  6804. </testSuite>
  6805. </testSuite>
  6806. <testSuite>
  6807. <documentation>Regressions</documentation>
  6808. <testCase>
  6809. <correct>
  6810. <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  6811. <start>
  6812. <element name="foo">
  6813. <choice>
  6814. <group>
  6815. <attribute name="bar"><empty/></attribute>
  6816. <element name="baz1"><empty/></element>
  6817. </group>
  6818. <group>
  6819. <attribute name="bar"><text/></attribute>
  6820. <element name="baz2"><empty/></element>
  6821. </group>
  6822. </choice>
  6823. </element>
  6824. </start>
  6825. </grammar>
  6826. </correct>
  6827. <valid>
  6828. <foo bar=" "><baz1/></foo>
  6829. </valid>
  6830. </testCase>
  6831. <testCase>
  6832. <correct>
  6833. <notAllowed xmlns="http://relaxng.org/ns/structure/1.0"/>
  6834. </correct>
  6835. <invalid>
  6836. <foo/>
  6837. </invalid>
  6838. </testCase>
  6839. </testSuite>
  6840. </testSuite>