Kev siv XML schema yog dab tsi?
Kev siv XML schema yog dab tsi?

Video: Kev siv XML schema yog dab tsi?

Video: Kev siv XML schema yog dab tsi?
Video: Tshuaj theem vim li cas thiaj tau nqi ?/ Siv kho mob dab tsi?/paris polyphylla use for? 2024, Kaum ib hlis
Anonim

XML Schema feem ntau hu ua XML Schema Lus txhais ( XSD ). Nws yog siv piav thiab validate tus qauv thiab cov ntsiab lus ntawm XML cov ntaub ntawv. XML schema txhais cov ntsiab lus, yam ntxwv thiab cov ntaub ntawv hom. Schema element txhawb Namespaces.

Tom qab ntawd, lub hom phiaj ntawm XML schema yog dab tsi?

Cov lub hom phiaj ntawm ib XML Schema yog los txhais cov kev cai lij choj tsev blocks ntawm ib XML document: cov ntsiab lus thiab cov yam ntxwv uas tuaj yeem tshwm sim hauv daim ntawv. tus naj npawb ntawm (thiab kev txiav txim ntawm) cov ntsiab lus me me. hom ntaub ntawv rau cov ntsiab lus thiab cov cwj pwm.

Qhov thib ob, puas yog XML schema xav tau? Tag nrho XML cov ntaub ntawv yuav tsum ua kom zoo, tab sis nws tsis yog xav tau tias daim ntawv yuav siv tau tshwj tsis yog cov XML parser yog "validating", nyob rau hauv cov ntaub ntawv no cov ntaub ntawv kuj raug soj ntsuam rau conformance nrog nws txuam schema . DTD-validating parsers yog feem ntau, tab sis qee qhov kev txhawb nqa XML Schema los yog RELAX NG thiab.

Kuj paub, dab tsi yog schema hauv XML piv txwv?

Ib piv txwv ntawm XML Schema Nws txhais tau hais tias cov txheej txheem complex "bginnersbook" yog ib ntu ntawm cov ntsiab lus. Nws txhais tau tias lub ntsiab "rau" yog hom hlua. Nws txhais tau hais tias lub ntsiab "kev kawm" yog hom hlua.

XML schema validation ua haujlwm li cas?

XML validation yog tus txheej txheem ntawm kev txheeb xyuas cov ntaub ntawv sau rau hauv XML (eXtensible Markup Language) kom paub meej tias nws yog ob qho tib si tsim tau zoo thiab tseem "tsim nyog" nyob rau hauv uas nws ua raws li cov qauv uas tau hais tseg. Cov ntaub ntawv siv tau kuj tseem hwm cov cai hais los ntawm DTD tshwj xeeb lossis XML schema.

Pom zoo: