Skip to content

Commit

Permalink
XSD/DTD: Some small corrections
Browse files Browse the repository at this point in the history
* XSD: Mentioned that point object type was added in Tiled 1.1
* XSD: Removed objectgroup attributes defined on group layer element
* DTD: More precisely defined 'locked' and 'infinite' attribute values
* DTD: Added locked attribute also on 'objectgroup'

The DTD is still very incomplete, though I don't know whether it's worth
updating.
  • Loading branch information
bjorn committed Oct 30, 2020
1 parent c8f11fd commit d3c3987
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
5 changes: 3 additions & 2 deletions util/java/libtiled-java/src/main/resources/map.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
staggeraxis CDATA #IMPLIED
staggerindex CDATA #IMPLIED
backgroundcolor CDATA #IMPLIED
infinite CDATA #IMPLIED
infinite (0 | 1) #IMPLIED
nextlayerid ID #IMPLIED
nextobjectid ID #IMPLIED
>
Expand Down Expand Up @@ -139,7 +139,7 @@
y CDATA #IMPLIED
opacity CDATA #IMPLIED
visible (0 | 1) #IMPLIED
locked CDATA #IMPLIED
locked (0 | 1) #IMPLIED
>

<!ELEMENT objectgroup (properties?, object*)>
Expand All @@ -152,6 +152,7 @@
y CDATA #IMPLIED
opacity CDATA #IMPLIED
visible (0 | 1) #IMPLIED
locked (0 | 1) #IMPLIED
>

<!ELEMENT object (properties?)>
Expand Down
25 changes: 7 additions & 18 deletions util/java/libtiled-java/src/main/resources/map.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -248,23 +248,6 @@ POSSIBILITY OF SUCH DAMAGE.
<xs:element name="group" type="Group" maxOccurs="unbounded"/>
</xs:choice>
</xs:sequence>

<xs:attribute name="color" type="xs:string">
<xs:annotation>
<xs:documentation>
The color used to display the objects in this group.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="draworder" type="xs:string">
<xs:annotation>
<xs:documentation>
Whether the objects are drawn according to the order
of appearance ("index") or sorted by their
y-coordinate ("topdown"). Defaults to "topdown".
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Expand Down Expand Up @@ -655,7 +638,13 @@ POSSIBILITY OF SUCH DAMAGE.

<xs:sequence>
<xs:element name="properties" type="Properties"/>
<xs:element name="point" type="Point"/>
<xs:element name="point" type="Point">
<xs:annotation>
<xs:documentation>
@since 1.1
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ellipse" type="Ellipse">
<xs:annotation>
<xs:documentation>
Expand Down

0 comments on commit d3c3987

Please sign in to comment.