<< Chapter < Page Chapter >> Page >

En sådan grammatik, som definerer hvilke tags der må forekomme, hvor mange gange og i hvilken rækkefølge, kaldes her og i tilhørende moduler også for en informationsmodel Begrebet informationsmodel bruges her om den konceptuelle pendant til det som med en teknisk term i XML betegnes som en DTD: Document Type Definition. I modul 3 gennemgåes dette nærmere. . Den særlige syntaks som gælder for opbygning af informationsstrukturerne i et XML-dokument vil blive gennemgået i det følgende. Ønsker man at studere dette emne i en original version, anbefales det at starte på www.w3.org .

2. opmærkning med xml

2.1 forlægget

Det er som det første vigtig at være opmærksom på, at man ikke skal skrive sine XML-dokumenter i et tekstbehandlingsprogram. Et sådant program indsætter koder overalt i dokumentet, for linieskift, indrykning af afsnit og andet tilsvarende, og den XML-processor som skal tage hånd om dokumentet vil ikke acceptere disse koder. Det vil give en masse fejlmeddelelser. Brug derfor enten en almindelig teksteditor som for eksempel Notepad, eller find en XML-editor på nettet Opmærkninger vist i dette og de øvrige moduler er foretaget ved hjælp af den særlige XML-editor Altova XMLSpy. .

Udgangspunkt for gennemgangen af de basale byggeklodser i XML er følgende bogtitel fundet i Gentofte Kommunes online-katalog og her præsenteret i let bearbejdet version:

Roman Anne Marie LønSekstetten [Kbh.]: Gyldendal, 2008. - 550 sider ISBN 978-87-02-07227-3 : hf. : kr. 299,00.ISBN 978-87-02-07365-2 : ib. : kr. 349,00.

Skal denne information omsættes til et XML-dokument, kunne resultatet være som

vist nedenfor:

1:<?xml version="1.0" encoding="UTF-8" ?>

2:<bog>

3:<forfatter>

4:<fornavn>Anne Marie</fornavn>

5: <efternavn>Løn</efternavn>

6:</forfatter>

7:<titel>Sekstetten</titel>

8:<forlag sted="København">Gyldendal</forlag>

9:<udg>2008</udg>

10<sidetal>550</sidetal>

11:<ISBN>

12:<heftet pris=" 299,00">978-87-02-07227-3</ heftet>

13:<indbundet pris="349,00">978-87-02-07365-2</ indbundet>

14:</ISBN>

15:<genre>roman</genre>

16:</bog>

fig. 2: sekstetten.xml

2.2 xml – sproget

Et XML-dokument består af en prolog og et antal elementer . I en prolog placerer man alle de instrukser som specificerer hvordan dokumentet skal behandles, for eksempel en grammatik for dokumentet. Her angiver man også om for eksempel et style-sheet skal inddrages i den aktuelle kørsel. Prologen er altid det første man møder i et XML-dokument.

2.2.1 Prologen

Som det allerførste i linie 1 i sekstetten.xml er der i prologen placeret en såkaldt deklaration :

1:<?xml version=”1.0” encoding=”UTF-8” ?>

Her defineres at der er tale om XML og at der anvendes version nummer 1.0. Endvidere defineres et tegnsæt og dermed mængden af tegn som processoren kan genkende UTF-8 = USC Transformation Format (Unicode Standard Characters) for 8 bit . I denne mængde indgår blandt andet de danske tegn æ, ø, å og det gør dermed tilværelsen lettere for alle dansktalende brugere af XML.

Anvendelsen og placeringen af spørgsmålstegn definerer en såkaldt processing instruction (PI), det vil sige at alle informationer her er systemorienterede, at de ikke indgår i selve XML-dokumentet og derfor ikke skal godkendes som velformede af XML-processoren.

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