<< Chapter < Page Chapter >> Page >
En gennemgang af det elementære grundlag for opmærkning i XML og opbygningen af et XML-dokument

Xml – grundlaget

1. xml – før vi starter

1.1 xml – extensible markup language

XML præsenteres generelt som et opmærkningssprog på lige fod med HTML. Der er altså i begge tilfælde tale om en form for sprog, de hedder begge Markup Language , og de bruger begge tags til opmærkning. Den samlede mængde af tags kaldes traditionelt for et vokabular .

I XML udarbejder du dit eget vokabular. I HTML er der et foruddefineret vokabular, det vil sige en mængde gyldige, navngivede tags, som angiver hvordan data i et HTML-dokument skal præsenteres. Derfor vil man også møde de samme tags i stort set alle HTML-dokumenter. Formålet med et prædefineret vokabular er indlysende: en hvilken som helst browser kan genkende og fortolke de tags der forekommer i et dokument og vise indholdet i dokumentet i overensstemmelse hermed.

Et XML-vokabular udgøres af tags som er valgt og defineret med henblik på at fortælle noget om indholdet i data. Et XML-vokabular vil derfor være forskelligt fra det ene XML-dokument til det andet, afhængigt af de skiftende indhold som skal opmærkes. Der findes imidlertid regler for hvordan et XML-vokabular skal se ud, hvordan det skal struktureres. Disse regler – se dem i afsnit 3 i dette modul – udgør rygraden i XML.

XML er et sæt regler for opmærkning. Følger man disse regler bliver

resultatet et velformet XML-dokument som gør det muligt at bygge,

vedligeholde, udveksle og genbruge data. “Strictly speaking, XML is not a markup language. A language has a fixed vocabulary and grammar, but XML doesn’t actually define any elements. Instead, it lays down a foundation of syntactic constraints on which you can build your own language.” Ray: Learning XML , O’Reilly 2003, p.6

XML er således et meta-sprog , det vil sige et sprog som kan bruges af alle der gerne vil opmærke en eller flere tekster i deres eget opmærkningssprog. Men hvis man vil gøre sig forståelig for omverden, for eksempel fordi man vil distribuere sine opmærkede dokumenter, er det vigtigt at man overholder den særlige syntaks der gælder for XML.

1.2 xml-dokumentet

En opmærket tekst gemmes som et XML-dokument . Et XML-dokument indeholder strukturerede data som i kraft af opmærkningen udgør struktureret information .

Vi vil typisk opbevare et XML-dokument som en fil, en fysisk enhed gemt i et lager på en computer, hvorfor vi giver vores fil efternavnet *.xml. Men vi vil også gerne have at dokumentet, den logiske enhed, informationsenheden , kan læses og genkendes som XML af en XML-processor. Det vil blandt meget andet sætte os i stand til at udveksle XML-dokumenter med andre brugere på tværs af computere, styresystemer og diverse andre teksnologiske restriktioner. For at opnå dette bliver nødt til at følge de regler som definerer hvad der gør strukturerede data til et velformet og gyldigt XML-dokument.

At et dokument er velformet vil sige, at det overholder de syntaksregler der er defineret for XML. At et dokument er gyldigt vil sige, at der foreligger en form for grammatik for opmærkningen og at den konkrete opmærkning er i overensstemmelse hermed.

Questions & Answers

what is microbiology
Agebe Reply
What is a cell
Odelana Reply
what is cell
Mohammed
how does Neisseria cause meningitis
Nyibol Reply
what is microbiologist
Muhammad Reply
what is errata
Muhammad
is the branch of biology that deals with the study of microorganisms.
Ntefuni Reply
What is microbiology
Mercy Reply
studies of microbes
Louisiaste
when we takee the specimen which lumbar,spin,
Ziyad Reply
How bacteria create energy to survive?
Muhamad Reply
Bacteria doesn't produce energy they are dependent upon their substrate in case of lack of nutrients they are able to make spores which helps them to sustain in harsh environments
_Adnan
But not all bacteria make spores, l mean Eukaryotic cells have Mitochondria which acts as powerhouse for them, since bacteria don't have it, what is the substitution for it?
Muhamad
they make spores
Louisiaste
what is sporadic nd endemic, epidemic
Aminu Reply
the significance of food webs for disease transmission
Abreham
food webs brings about an infection as an individual depends on number of diseased foods or carriers dully.
Mark
explain assimilatory nitrate reduction
Esinniobiwa Reply
Assimilatory nitrate reduction is a process that occurs in some microorganisms, such as bacteria and archaea, in which nitrate (NO3-) is reduced to nitrite (NO2-), and then further reduced to ammonia (NH3).
Elkana
This process is called assimilatory nitrate reduction because the nitrogen that is produced is incorporated in the cells of microorganisms where it can be used in the synthesis of amino acids and other nitrogen products
Elkana
Examples of thermophilic organisms
Shu Reply
Give Examples of thermophilic organisms
Shu
advantages of normal Flora to the host
Micheal Reply
Prevent foreign microbes to the host
Abubakar
they provide healthier benefits to their hosts
ayesha
They are friends to host only when Host immune system is strong and become enemies when the host immune system is weakened . very bad relationship!
Mark
what is cell
faisal Reply
cell is the smallest unit of life
Fauziya
cell is the smallest unit of life
Akanni
ok
Innocent
cell is the structural and functional unit of life
Hasan
is the fundamental units of Life
Musa
what are emergency diseases
Micheal Reply
There are nothing like emergency disease but there are some common medical emergency which can occur simultaneously like Bleeding,heart attack,Breathing difficulties,severe pain heart stock.Hope you will get my point .Have a nice day ❣️
_Adnan
define infection ,prevention and control
Innocent
I think infection prevention and control is the avoidance of all things we do that gives out break of infections and promotion of health practices that promote life
Lubega
Heyy Lubega hussein where are u from?
_Adnan
en français
Adama
which site have a normal flora
ESTHER Reply
Many sites of the body have it Skin Nasal cavity Oral cavity Gastro intestinal tract
Safaa
skin
Asiina
skin,Oral,Nasal,GIt
Sadik
How can Commensal can Bacteria change into pathogen?
Sadik
How can Commensal Bacteria change into pathogen?
Sadik
all
Tesfaye
by fussion
Asiina
what are the advantages of normal Flora to the host
Micheal
what are the ways of control and prevention of nosocomial infection in the hospital
Micheal
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Xml og xslt - en introduktion. OpenStax CNX. Mar 03, 2009 Download for free at http://cnx.org/content/col10642/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Xml og xslt - en introduktion' conversation and receive update notifications?

Ask