Internal DTD hauv XML yog dab tsi?
Internal DTD hauv XML yog dab tsi?

Video: Internal DTD hauv XML yog dab tsi?

Video: Internal DTD hauv XML yog dab tsi?
Video: L20: XML DTD – Document Type Definition | Internal, External DTD with example | Web Technology 2024, Kaum ib hlis
Anonim

A DTD yog hu ua ib internal DTD yog hais tias cov ntsiab lus tau tshaj tawm nyob rau hauv lub XML cov ntaub ntawv. Siv nws li internal DTD , standalone attribute nyob rau hauv XML kev tshaj tawm yuav tsum tau teem rau muaj. Qhov no txhais tau tias cov lus tshaj tawm ua haujlwm ywj pheej ntawm lwm qhov chaw.

Tom qab ntawd, DTD yog dab tsi hauv XML?

Ib hom ntawv txhais lus ( DTD ) yog ib txheej ntawm cov ntawv tshaj tawm uas txhais cov ntaub ntawv rau SGML-tsev neeg cov lus cim (GML, SGML, XML , HTML). Nws txhais cov qauv ntaub ntawv nrog cov npe ntawm cov khoom siv tau thiab cov yam ntxwv. A DTD tuaj yeem tshaj tawm hauv kab hauv ib qho XML cov ntaub ntawv, lossis raws li kev siv sab nraud.

Tom qab ntawd, lo lus nug yog, DTD ua haujlwm li cas hauv XML? Lub hom phiaj ntawm a DTD yog los txhais cov kev cai lij choj tsev blocks ntawm ib XML ntaub ntawv. Nws txhais cov qauv ntaub ntawv nrog cov npe ntawm cov ntsiab lus raug cai. A DTD tau tau tshaj tawm inline hauv koj XML cov ntaub ntawv, lossis raws li kev siv sab nraud.

Ib yam li ntawd, qhov txawv ntawm sab hauv thiab sab nraud DTD yog dab tsi?

Lub xwb qhov sib txawv ntawm sab hauv thiab sab nraud yog nyob rau hauv txoj kev nws tau tshaj tawm nrog DOCTYPE. Vam tias qhov no yuav pab tau koj !!! Internal DTD : Koj tuaj yeem sau cov cai hauv daim ntawv XML siv cov lus tshaj tawm. Sab nraud DTD : Koj tuaj yeem sau cov cai hauv cov ntaub ntawv cais (nrog.

Puas yog DTD yuav tsum tau ua rau XML?

Cov DTD tsuas yog yuav tsum tau yog tias koj siv cov npe npe sab nraud 5 uas tau tsim rau hauv XML (& et al). Ib txhia XML parers yuav tsis quav ntsej nws kiag li. Qee tus yuav rub nws thiab siv nws.

Pom zoo: