Bonjour les développeurs,

Je dispose d'un document XML qui n'est pas valide selon Altova XMLSpy.

Le message d'erreur est le suivant :

File C:\wamp\www\SDSH\wp-includes\xml\apartments.xml is not valid.
Content model of element 'map' disallows element 'map-desc' at this position.
Error location: root / apartments / apartment / map / map-desc
Details
VC: Element Valid: Content model of element 'map' disallows element 'map-desc' at this position.
Mon fichier XML :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root SYSTEM "apartments.dtd">
<root>
  <categories>
    <maxID>4</maxID>
    <category id="1">Pacific Beach</category>
    <category id="2">Downtown</category>
    <category id="3">Mission Valley</category>
    <category id="4">SDSU</category>
  </categories>
  <apartments>
    <maxID>3</maxID>
    <apartment id="1" cat="1">
      <name>Basic PB</name>
      <number-bed>1</number-bed>
      <number-bath>1</number-bath>
      <type>Townhouse</type>
      <amenities>
        <amenity>2 assigned parking spaces</amenity>
        <amenity>Swimming-Pool</amenity>
        <amenity>Printing Center</amenity>
        <amenity>BasketBall Court</amenity>
        <amenity>Game Room</amenity>
      </amenities>
      <prices>
        <shared-bedroom>595</shared-bedroom>
      </prices>
      <contract-term>
        <semester>Spring Semester</semester>
        <from>
          <MM>07</MM>
          <DD>06</DD>
        </from>
        <until>
          <MM>10</MM>
          <DD>06</DD>
        </until>
      </contract-term>
      <map>
        <map-javascript>&lt;iframe width=\"425\" height=\"350\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"http://maps.google.com/maps/ms?hl=en&amp;amp;ie=UTF8&amp;amp;oe=UTF8&amp;amp;msa=0&amp;amp;msid=216349082348025562282.0004b31694bee31e5802e&amp;amp;t=h&amp;amp;ll=32.796997,-117.233884&amp;amp;spn=0,0&amp;amp;output=embed\"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;View &lt;a href=\"http://maps.google.com/maps/ms?hl=en&amp;amp;ie=UTF8&amp;amp;oe=UTF8&amp;amp;msa=0&amp;amp;msid=216349082348025562282.0004b31694bee31e5802e&amp;amp;t=h&amp;amp;ll=32.796997,-117.233884&amp;amp;spn=0,0&amp;amp;source=embed\" style=\"color:#0000FF;text-align:left\"&gt;Pacific Beach Basic&lt;/a&gt; in a larger map&lt;/small&gt;</map-javascript>
        <map-desc>Commuting Times:
 
SDSU/ALI:20 minutes by car, 50 minutes by bus/trolley
USD: 10 minutes by car, 45 minutes by bus
UCSD:15 minutes by car, 50 minutes by bus
Mesa College:10 minutes by car, 25 minutes by bus
City College:15 minutes by car, 35 minutes by bus
CIBU:15 minutes by car, 35 minutes by bus
Grossmont College: 25 minutes by car, 1h15minutes by bus/trolley
IAE:5 minutes by bus, 10 minutes by foot
EC-La Jolla:10 minutes by car, 20 minutes by bus
Kaplan-Aspect:10 minutes by car, 25 minutes by bus
 
*Provided data is for informational purposes only. For detailed information about commuting times, please check San Diego Metropolitan Transport Services :www.sdmts.com</map-desc>
      </map>
      <details>
        <price>$595/month/person for a shared bedroom. $795/month for a single bedroom. The price includes all utilities (electricity, gas, water, trash, and sewer) as well as cable TV. high-speed wireless internet, and a monthly cleaning of the common areas(kitchen, dining-room, living-room, bathrooms).</price>
        <bedroom-type>Shared Bedroom and Single Bedroom are available at this location.</bedroom-type>
        <furniture>The apartments are fully furnished (comfortable couches, coffee table, TV, dining table, chairs, beds, desks, shelves, lamps, dining and cooking ware) and equipped (fridge, oven/stove, microwave, dishwasher, washer/dryer inside the unit or on-site laundry room) Note: Students living at our Basic PB location must go to the laundromat which is a block away.</furniture>
        <to-bring>Students are responsible for their own bedding (sheet, blanket, pillow, pillow case) and linens (towels, wash clothes).</to-bring>
      </details>
      <policies>No-Party: Strictly enforced
 
Cleaning: Daily cleaning routine REQUIRED in common areas.
 
Noise: Strictly enforced. No noise heard outside of the unit between 10pm and 8am.
 
Pets: No Pets allowed inside unit or balcony (even visiting pets)
 
Co-ed Units: Yes, depending on semester. Call/E-mail your representative for up-to-date information
 
Smoking: Not allowed inside unit. Balcony available.
 
Alcohol: Allowed for students over 21y.o.
 
One Overnight Visitor: Allowed upon roommates approval.(7 nights max)</policies>
      <complexInfo>Your are looking at a 800 sq ft 2 bed/2bath unit (about 75sq. meter) located in a stand-alone 4-plex building. (4 apartments in one building)
 
Amenities:None.
 
Neighbors: Working middle-aged individuals. 
 
Parking: 2 parking spaces included.
 
Public Transportation: Bus Line 30,27,8/9 (www.SDMTS.com)
      </complexInfo>
      <floorplan>
        <floorplan-image>a47b399bf2b8e5ea14cc22b8f622d5f2.jpg</floorplan-image>
        <floorplan-desc>Your unit will be similar to the one displayed below. Furniture arrangement may vary.
 
Floorplan not yet available</floorplan-desc>
      </floorplan>
      <neighborhood>
        <neighborhood-desc>Our Pacific Beach Basic location is in the heart of Pacific Beach. Pacific Beach feels like a small beach town within San Diego. You can walk, ride your bike or your skateboard to the grocery stores, the bay, the beach, the bars, the restaurants and more. You\'ll see a lot of laid-back people, flip-flops, and beach cruisers.</neighborhood-desc>
        <neighborhood-images>
          <neighborhood-image>00f30389e50985377c1d5c114e5596fe.jpg</neighborhood-image>
          <neighborhood-image>903b2543b0de697ae25acfec9d6b1fb5.jpg</neighborhood-image>
          <neighborhood-image>4eab858c175baf4aa7ae63ca263bf8ea.jpg</neighborhood-image>
          <neighborhood-image>17951e0153865d25360fc69bed498971.jpg</neighborhood-image>
        </neighborhood-images>
      </neighborhood>
    </apartment>
    <apartment id="2" cat="2">
      <name>Deluxe Downtown</name>
      <number-bed>2</number-bed>
      <number-bath>2</number-bath>
      <type>Condominium</type>
      <amenities>
        <amenity>2 assigned parking spaces</amenity>
        <amenity>Across the Street from SDSU/ALI</amenity>
        <amenity>Swimming-Pool</amenity>
        <amenity>Jacuzzi</amenity>
        <amenity>Jacuzzi/BBQ</amenity>
        <amenity>Printing Center</amenity>
        <amenity>BasketBall Court</amenity>
        <amenity>Tennis Court</amenity>
        <amenity>Fitness Room</amenity>
        <amenity>Billiard Room</amenity>
        <amenity>Game Room</amenity>
      </amenities>
      <prices>
        <shared-bedroom>600</shared-bedroom>
        <single-bedroom>400</single-bedroom>
      </prices>
      <contract-term>
        <semester>Spring Semester</semester>
        <from>
          <MM>02</MM>
          <DD>01</DD>
        </from>
        <until>
          <MM>03</MM>
          <DD>29</DD>
        </until>
      </contract-term>
    </apartment>
    <apartment id="3" cat="1">
      <name>test</name>
      <number-bed>1</number-bed>
      <number-bath>1</number-bath>
      <contract-term>
        <semester>Spring Semester</semester>
      </contract-term>
      <prices>
        <shared-bedroom>595</shared-bedroom>
      </prices>
      <floorplan>
        <floorplan-image>a47b399bf2b8e5ea14cc22b8f622d5f2.jpg</floorplan-image>
        <floorplan-desc>Your unit will be similar to the one displayed below. Furniture arrangement may vary.</floorplan-desc>
      </floorplan>
    </apartment>
  </apartments>
</root>
Et la DTD qui l'accompagne :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
<!ELEMENT root (categories+, apartments+)>
<!ELEMENT categories (maxID, category*)>
<!ELEMENT maxID (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ATTLIST category id CDATA #REQUIRED>
<!ELEMENT apartments (maxID, apartment*)>
<!ELEMENT apartment (name, number-bed, number-bath, type?, amenities?, prices?, contract-term, map?, details?, policies?, floorplan?, complex-info?, neighborhood?)>
<!ATTLIST apartment id CDATA #REQUIRED>
<!ATTLIST apartment cat CDATA #REQUIRED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT number-bed (#PCDATA)>
<!ELEMENT number-bath (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT amenities (amenity*)>
<!ELEMENT amenity (#PCDATA)>
<!ELEMENT prices (shared-bedroom?, single-bedroom?)>
<!ELEMENT shared-bedroom (#PCDATA)>
<!ELEMENT single-bedroom (#PCDATA)>
<!ELEMENT contract-term (semester, from?, until?)>
<!ELEMENT semester (#PCDATA)>
<!ELEMENT from (MM?, DD?)>
<!ELEMENT until (MM?, DD?)>
<!ELEMENT MM (#PCDATA)>
<!ELEMENT DD (#PCDATA)>
<!ELEMENT map (map-javascript?, mac-desc?)>
<!ELEMENT map-javascript (#PCDATA)>
<!ELEMENT map-desc (#PCDATA)>
<!ELEMENT details (price?, bedroom-type?, furniture?, to-bring?)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT bedroom-type (#PCDATA)>
<!ELEMENT furniture (#PCDATA)>
<!ELEMENT to-bring (#PCDATA)>
<!ELEMENT policies (#PCDATA)>
<!ELEMENT floorplan (floorplan-image?, floorplan-desc?)>
<!ELEMENT floorplan-image (#PCDATA)>
<!ELEMENT floorplan-desc (#PCDATA)>
<!ELEMENT complex-info (#PCDATA)>
<!ELEMENT neighborhood (neighborhood-desc?, neighborhood-images?)>
<!ELEMENT neighborhood-images (neighborhood-image*)>
Qu'est-ce qui cloche ? Le message d'erreur est clair, et pourtant..

Merci et bonne journée