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

Incorrect PLIST example in "Comments" chapter #266

Open
bmix opened this issue May 7, 2019 · 3 comments
Open

Incorrect PLIST example in "Comments" chapter #266

bmix opened this issue May 7, 2019 · 3 comments

Comments

@bmix
Copy link

bmix commented May 7, 2019

The last example at Docs » Reference » Comments has a closing <plist> without the opening element tag.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
   <dict>
      <key>shellVariables</key>
      <array>
         <dict>
            <key>name</key>
            <string>TM_COMMENT_START</string>
            <key>value</key>
            <string>// </string>
         </dict>
         <dict>
            <key>name</key>
            <string>TM_COMMENT_START_2</string>
            <key>value</key>
            <string>/*</string>
         </dict>
         <dict>
            <key>name</key>
            <string>TM_COMMENT_END_2</string>
            <key>value</key>
            <string>*/</string>
         </dict>
      </array>
   </dict>
   <key>uuid</key>
   <string>BC062860-3346-4D3B-8421-C5543F83D11F</string>
</dict>
</plist>

The first example seems also to be incomplete (string in the 2nd dict is empty):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>name</key>
   <string>Miscellaneous</string>
   <key>scope</key>
   <string>source.python</string>
   <key>settings</key>
   <dict>
      <string></string>
      <key>shellVariables</key>
      <array>
         <dict>
            <key>name</key>
            <string>TM_COMMENT_START</string>
            <key>value</key>
            <string># </string>
         </dict>
      </array>
   </dict>
</dict>
</plist>
@FichteFoll
Copy link
Collaborator

The last example is indeed missing some elements, but not an opening plist tag. The extraneous string tag in the first example should also be removed.

Thanks for the report.

@bmix
Copy link
Author

bmix commented May 8, 2019

You're right, I misinterpreted the error message, which was:

The element type "plist" must be terminated by the matching end-tag "</plist>".

The error may be the last two items needing a container. But I got not the slightest clue about Apple's PLIST format or its XML representation, so can't help here.

For the second example (in my post) the error Xerces gives is:

Unexpected element "string". The content of the parent element type must match "(key,(array\|data\|date\|dict\|real\|integer\|string\|true\|false))*".

@FichteFoll
Copy link
Collaborator

Well, if you read through the docs on that page and understand how plists are formatted, it should become clear why this is incorrect.

It will take a while before the docs can be fixed because we need to do some infrastructural changes, but consider it noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants