XML issues in 'xptv' files: 'id', XML declaration.
@graham.rick
Submitted by Rick Assigned to Rick @graham.rick
Description
- The 'id' attribute in an XML file is supposed to be unique.
- Also the file should have a process instruction (xml header) as the first line.
Maybe this should be two bugs, but I suspect it's an easy fix
- ID ATTRIBUTE:
see: http://www.w3.org/TR/xml-id/#processing
I was looking at an xptv project file, considering doing a little tinkering in there.
The id's in your files are integers (fine) but they are oft repeated. The purpose of an 'id' in an XML file is to uniquely identify an element, which cannot be done if id's are not unique.
If you require a common identifying attribute across elements, I suggest you use another attribute name (i.e."pid").
The sooner you handle this the better. XML processing agents will balk at your markup because of this. You are creating XML that is not compatible with programs like XMLSpy, oXygen, and probably many others. After all, the grand purpose of XML is to create data that can be read and manipulated generically.
- example elements:
- XML DECLARATION
It would be good to lead off with an XML declaration tag, this is not required, but a damned good idea.
If you have the first line of the file read:
-
text editors will recognize it as XML and you'll get syntax highlighting. (tested)
-
'file' will recognize it as an XML file rather than ASCII text (tested)
(I also tested loading a project file from code both with and without the header and had no issues with parsing.)
Thanks for the app.
Imported from https://bugzilla.gnome.org/show_bug.cgi?id=619884