On dispose d'un ensemble de fichier XML de meme nature, voici un extrait de l'un de ces fichiers:<A><B><E></E><D><F></F><G></G></D><D><G></G></D></B><B><E></E><D></D></B><B></B><C></C><D><F></F><G></G></D><B><E></E><D><G></G></D></B></A>les elements A et B ont un prix (toujours), un age (parfois). Les elements D ont une couleur. Leselements G ont une couleur toujours noire et parfois un prix.proposez une DTD en vous inspirant de cela
Question
On dispose d'un ensemble de fichier XML de meme nature, voici un extrait de l'un de ces fichiers:<A><B><E></E><D><F></F><G></G></D><D><G></G></D></B><B><E></E><D></D></B><B></B><C></C><D><F></F><G></G></D><B><E></E><D><G></G></D></B></A>les elements A et B ont un prix (toujours), un age (parfois). Les elements D ont une couleur. Leselements G ont une couleur toujours noire et parfois un prix.proposez une DTD en vous inspirant de cela
Solution
Voici une proposition de DTD basée sur les informations fournies :
<!DOCTYPE A [
<!ELEMENT A (B+, C?, D?, B*)>
<!ELEMENT B (E?, D*)>
<!ELEMENT C EMPTY>
<!ELEMENT D (F?, G*)>
<!ELEMENT E EMPTY>
<!ELEMENT F EMPTY>
<!ELEMENT G EMPTY>
<!ATTLIST A prix CDATA #REQUIRED
age CDATA #IMPLIED>
<!ATTLIST B prix CDATA #REQUIRED
age CDATA #IMPLIED>
<!ATTLIST D couleur CDATA #REQUIRED>
<!ATTLIST G couleur CDATA "noire"
prix CDATA #IMPLIED>
]>
Dans cette DTD, les éléments A et B ont des attributs de prix (toujours requis) et d'âge (parfois présents, donc implicites). L'élément D a un attribut de couleur (toujours requis). L'élément G a un attribut de couleur qui est toujours "noire" et parfois un attribut de prix (donc implicite). Les éléments C, E, F sont vides. L'élément A peut contenir un ou plusieurs éléments B, un élément C (optionnel), un élément D (optionnel), et zéro ou plusieurs éléments B. L'élément B peut contenir un élément E (optionnel) et zéro ou plusieurs éléments D. L'élément D peut contenir un élément F (optionnel) et zéro ou plusieurs éléments G.
Similar Questions
Consider the following XML document. <?xml v e r si o n = ‘ ‘1.0”? > <walks> <t r e k name= ‘ ‘ Keple r”> <l o c a ti o n >Fi o rdl and </l o c a ti o n > <d i f f i c u l t y >moderate</ d i f f i c u l t y > <len g th >60km</len g th> <r a ti n g >88</ r a ti n g > </t re k> <t r e k name= ‘ ‘ Routeburn”> <l o c a ti o n >Fi o rdl and </l o c a ti o n > <d i f f i c u l t y >moderate</ d i f f i c u l t y > <len g th >32km</len g th> <r a ti n g >98</ r a ti n g > </t re k> <t r e k name= ‘ ‘ T on g a ri r o C r o s si n g”> <l o c a ti o n >Tongariro </l o c a ti o n > <d i f f i c u l t y >hard</ d i f f i c u l t y > <len g th >19.4km</len g th> <r a ti n g >96</ r a ti n g > </t re k> <walks>For every distinct location l for which no trek with rating less than 85 exists, return an element node with label location that has the following content: i) a child element labelled location name with the name of the location as text content, and ii) for each trek in that location, an element child labelled trek with the name of the trek as text content.
Consider the following XML document and answer the questions below.1234567891011121314<WebServiceResponse> <status>OK</status> <result> <type>Building</type> <name>Dreese Labs</name> <location> <lat>40.002382</lat> <lng>-83.015958</lng> </location> </result> <result> <message>CSE Department</message> </result> </WebServiceResponse>What are the tags in this XML document?What are the text strings in this XML document?What are the attributes for each tag in this XML document?
<?xml version = "1.0” encoding = "UTF-8"? > <doc> <a> <b> <a/> <a/> </b> <b> <a/> </b> <b> <a/> <a> <b/> <b/> </a > <a/> </b> </a> </doc> ) Convert each of the following queries into the corresponding XPath expression, and evaluate it on the tree by listing the pre-identifier of the nodes returned. i. For every element child m of some element node, and for every node n that is the third among all b-labelled element children of m, return the node that is the second among all element children for some descendant-or-self node of n.
Now consider the following XML document and answer the questions below.12345678910<album label="Sony"> <title>Gershwin: Rhapsody In Blue / An American In Paris</title> <composer>George Gershwin</composer> <conductor>Leonard Bernstein</conductor> <released date="Oct 25, 1990"></released> <tracks> <track number="1" duration="16:29">Rhapsody in Blue</track> <track number="2" duration="18:30">An American in Paris</track> </tracks></album>What tags have attributes?For each tag with attributes, list the attribute name and the corresponding attribute value.
Les fichiers texte message1.txt et message2.txt sont imprimés sur la console.Les fichiers texte message1.txt et message2.txt sont joints à un courrier électronique.Les fichiers texte message1.txt et message2.txt sont remplacés par un nouveau fichier appelé email.txt.Les fichiers texte message1.txt et message2.txt sont regroupés dans un nouveau fichier appelé email.txt.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.