Qhov txawv ntawm XML thiab SGML

Qhov txawv ntawm XML thiab SGML
Qhov txawv ntawm XML thiab SGML

Video: Qhov txawv ntawm XML thiab SGML

Video: Qhov txawv ntawm XML thiab SGML
Video: Qhov txawv ntawm Zaj Tshoob and Txiv Xaiv 2024, Kaum ib hlis
Anonim

XML vs SGML

XML stands for EXtensible Markup Language. Nws tau txhais hauv XML 1.0 specification, uas yog tsim los ntawm W3C (World Wide Web Consortium). XML muab ib txoj hauv kev, uas yog ib qho yooj yim, los encode cov ntaub ntawv thiab cov ntawv nyeem xws li cov ntsiab lus tuaj yeem hloov pauv ntawm cov khoom siv tsav tsheb, kev khiav hauj lwm thiab cov ntawv thov uas muaj kev cuam tshuam me ntsis ntawm tib neeg. SGML (Standard Generalized Markup Language) yog ISO (International Organization for Standardization) tus qauv rau kev qhia cov ntaub ntawv cim hom lus lossis ib pawg cim npe. SGML tsis yog hom ntaub ntawv tab sis yog Document Type Definition (DTD).

XML

XML yog cov lus cim uas siv los hloov cov ntaub ntawv thiab cov ntawv ntawm tus tsav tsheb kho vajtse, kev khiav haujlwm thiab cov ntawv thov uas muaj kev cuam tshuam me ntsis ntawm tib neeg. XML muab cov cim npe, cov yam ntxwv thiab cov qauv tsim uas tuaj yeem siv los muab cov ntaub ntawv ntsiab lus. Cov ntaub ntawv ntsiab lus no tuaj yeem siv los txiav txim siab lub ntsiab lus ntawm cov ntsiab lus. Qhov no ua rau nws muaj peev xwm txhim kho kev tshawb fawb xyaw zoo thiab ua cov ntaub ntawv mining ntawm cov ntaub ntawv. Tsis tas li ntawd, cov ntaub ntawv kev sib raug zoo ib txwm tsim nyog raws li XML cov ntaub ntawv vim tias lawv tuaj yeem teeb tsa hauv kab thiab kab tab sis XML muab kev txhawb nqa tsawg dua rau cov ntaub ntawv nrog cov ntsiab lus nplua nuj xws li suab, video, cov ntaub ntawv nyuaj, thiab lwm yam. XML databases khaws cov ntaub ntawv hauv cov qauv, hierarchical daim ntawv uas tso cai rau cov lus nug kom ua tau zoo dua. XML tag tsis tau txhais ua ntej thiab cov neeg siv tuaj yeem txhais cov cim tshiab thiab cov qauv ntaub ntawv. Tsis tas li ntawd, cov lus tshiab hauv internet xws li RSS, Atom, SOAP, thiab XHTM tau tsim siv XML.

SGML

SGML yog raws li lub tswv yim hais tias txawm tias ib daim ntawv tuaj yeem tso tawm nrog qhov sib txawv nyob ntawm cov khoom siv nruab nrab siv, nws muaj qee yam qauv thiab cov ntsiab lus uas tsis hloov pauv nrog kev siv nws li cas. SGML raws li cov ntaub ntawv tuaj yeem tsim yam tsis muaj kev cuam tshuam txog cov ntaub ntawv zoo li uas tuaj yeem hloov pauv sijhawm, tab sis hais txog cov qauv ntaub ntawv. Tsis tas li ntawd, SGML compiler tuaj yeem txhais cov ntaub ntawv siv nws cov DTD, yog li cov ntaub ntawv no muab tau yooj yim dua. Tsis tas li ntawd, cov ntaub ntawv raws li SGML tuaj yeem hloov kho tau yooj yim rau cov xov xwm sib txawv (piv txwv li, cov ntaub ntawv npaj rau kev luam tawm tuaj yeem raug nyeem rau lub vijtsam zaub).

Qhov txawv ntawm XML thiab SGML yog dab tsi?

Thaum XML yog cov lus cim uas siv los hloov cov ntaub ntawv thiab cov ntawv ntawm tus tsav tsheb kho vajtse, kev khiav haujlwm thiab cov ntawv thov, SGML yog tus qauv ISO rau kev qhia cov ntaub ntawv cim lus lossis cov ntawv cim npe. XML yog ib hom lus markup uas yog raws li SGML. Tab sis XML txwv qee qhov kev txwv uas tsis nyob hauv SGML. Piv txwv li, XML tsim cov kev txwv nram qab no: cov ntaub ntawv hais txog qhov chaw yuav tsum raug kaw nrog REFC delimiter, cov ntaub ntawv xa mus rau cov ntaub ntawv sab nraud hauv cov ntsiab lus tsis raug tso cai, cov ntaub ntawv pov thawj yuav tsum raug kaw nrog REFC delimiter, npe hu ua cov ntaub ntawv pov thawj tsis raug tso cai, thiab lwm yam. Tsis tas li ntawd, qee qhov kev tsim kho xws li tsis tau kaw qhov pib-tags, tsis kaw qhov kawg-tags, khoob pib-tags, khoob kawg-tags uas tau tso cai hauv SGML thaum SHORTTAG yog YOG, tsis tso cai hauv XML. Tsis tas li ntawd, qee qhov kev tshaj tawm SGML xws li DATATAG, OMITTAG, RANK, LINK (SIMPLE, IMPLICIT thiab EXPLICIT), thiab lwm yam tsis raug tso cai hauv XML.

Pom zoo: