View Issue Details

IDProjectCategoryView StatusLast Update
0003171JEDI VCL00 JVCL Componentspublic2005-10-02 05:53
ReporterelahnAssigned Toobones 
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0003171: New TJvSimpleXMLOptions: sxoDontSaveProlog
DescriptionIn the XML Spec it states that "XML documents SHOULD begin with an XML declaration". However, it goes on to explain that this is NOT required for a 'well-formed' XML document.


Argument: For internally stored documents that will NOT be provided to an external party, the XML declaration only serves to increase the size of the data.

Proposal: That sxoDontSaveProlog is added to TJvSimpleXMLOptions. This gives the developer the choice, while remaining fully compliant with the XML standard.
Additional InformationI will happily implement this feature and upload the file, if it is accepted.

Unfortunately, if a solution is not reached, I will have to copy JvSimpleXML.pas and maintain a modified version. I do not want to do this if it can be avoided.
TagsNo tags attached.



2005-08-31 01:26

administrator   ~0007899

The option would be better called sxoNoProlog as using the word "save" in it may imply that the prolog is there but not saved.
By default, this options is not in, to keep backward compatibility.
Thanks for the proposal.


2005-08-31 02:08

developer   ~0007901

Last edited: 2005-08-31 02:25

So a sxoNoProlog option would mean that the Prolog is not Loaded or Saved, fine by me. :) I assume you're not suggesting having Prolog = nil when sxoNoProlog is set, as it is a public object property.

It may be desirable in the future to have the Prolog there but not saved, when Validity checking is implemented. For example, a document is received from an external source with no Document Type Declaration, is loaded, standard prolog with DTD is loaded, Validity is checked, then it is saved into the internal storage with no prolog.

Until Validity checking is implemented, there is no reason to have a prolog, but not save and load it. Let me know which way you want to go with it and if you want me to implement it and upload the file. Thanks for the feedback.


2005-08-31 03:03

administrator   ~0007903

Ok, I see what you mean.
I think it would be better to discuss this in the newsgroups here: news://

This way more people can give their feedback and then an answer can be given (maybe two options). And then again, save, does it apply to every way to save the XML (string, file, stream...)

2005-09-28 21:45 (15,483 bytes)


2005-09-28 21:51

developer   ~0007990

I have implemented sxoDoNotSaveProlog, as discussed in the newsgroup. It is ready to be committed to CVS.

If a prolog is present in a xml file, it is still loaded. If the sxoDoNotSaveProlog option is set, the prolog is not written during Save.


2005-10-02 05:53

administrator   ~0007994

This is now in CVS

Issue History

Date Modified Username Field Change
2005-08-29 18:18 elahn New Issue
2005-08-31 01:26 obones Note Added: 0007899
2005-08-31 01:26 obones Status new => feedback
2005-08-31 02:08 elahn Note Added: 0007901
2005-08-31 02:25 elahn Note Edited: 0007901
2005-08-31 03:03 obones Note Added: 0007903
2005-09-28 21:45 elahn File Added:
2005-09-28 21:51 elahn Note Added: 0007990
2005-10-02 05:53 obones Status feedback => resolved
2005-10-02 05:53 obones Resolution open => fixed
2005-10-02 05:53 obones Assigned To => obones
2005-10-02 05:53 obones Note Added: 0007994