Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMX documentation not clear on number of 'can contain' types #1754

Closed
dyson opened this issue Sep 21, 2017 · 2 comments
Closed

TMX documentation not clear on number of 'can contain' types #1754

dyson opened this issue Sep 21, 2017 · 2 comments
Labels
documentation Issue related to the Tiled Manual.

Comments

@dyson
Copy link

dyson commented Sep 21, 2017

I'm working on parsing TMX files and I can't figure out from the documentation if 'can contain' objects can be included multiple times or only once. For example under <imageLayer> it expressly mentions "A layer consisting of a single image" so I know there can only be one child image. Other objects are not so clear.

Prefixing or appending something to each 'can contain' object that can be included multiple times would make this much clearer.

Fox example an asterisk to mark 1 or many objects of the same type are accepted:

Can contain: <properties>, <layer>*, <objectgroup>*, <imagelayer>*, <group>*

It is also not clear at all which attributes/'can contain' objects are required as mentioned in #696 .

@bjorn bjorn added the documentation Issue related to the Tiled Manual. label Sep 21, 2017
@bjorn
Copy link
Member

bjorn commented Sep 21, 2017

I'm working a lot on the documentation lately, so while I'm at it I might as well make sure this information is included. Thanks for bringing it up!

@dyson
Copy link
Author

dyson commented Sep 22, 2017

Thanks heaps bjorn!

I tried to piece the info together from the JSON docs and from the DTD file which does include this information but they were incomplete and I wasn't sure if it was just me reading the docs wrong!

Cheers!

Phlosioneer added a commit to Phlosioneer/tiled that referenced this issue Dec 18, 2019
All "can contain" entries have been split into "can contain at most one"
and "can contain any number". Additionally, there is now a note to
implementors at the top of the specification listing how to handle parsing
errors. (More of a reminder on how to handle XML errors in general, since
TMX is a form of XML.)

Closes mapeditor#696, mapeditor#1754
@bjorn bjorn closed this as completed in 916be54 Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issue related to the Tiled Manual.
Projects
None yet
Development

No branches or pull requests

2 participants