Talk:XML/Output: Difference between revisions

→‎Modification of Task: don't sweat it...
(Escaping Escapes)
(→‎Modification of Task: don't sweat it...)
Line 52:
::Why quoted strings? Why not just enter the example input as plain text? In real world applications, the data would came from user, or from file, or from stdin, etc. Normally, the text is just plain text, with no quotes or escape characters. (Of course the test code that calls the actual function could use string constants, but that is language and implementation specific.) On the other hand, using two input lists would be quite strange way to enter data in real world. It would be more logical to enter the name and remark together, as a pair. (But I don't quite understand what this "remark" is supposed to be.) --[[User:PauliKL|PauliKL]] 15:27, 9 June 2009 (UTC)
:Hi Pauli, I've changed the example above to be without outer quotes for the input text descriptions and removed the backslash. I have chosen the simplest input format that I thought languages could cope with. The focus is to be the generation of correctly formatted XML. The remark is just a device to allow the example to include characters that should be quoted, as is the apostrophe in Tam O'Shanter. --[[User:Paddy3118|Paddy3118]] 18:08, 9 June 2009 (UTC)
::I've (re)done the Tcl implementation as a single combined list (as that's the natural way to do it with Tcl's iterators). Don't get hung up over the small stuff. Note that serializers might be smart enough to know that they don't need to quote in "Tam O'Shanter"; what's required is that documents be syntactically valid XML with the same infoset as the sample. (Matching the strings completely is harder and would be better saved for a task that specifies a specific normalization form; this is not that task.) —[[User:Dkf|Donal Fellows]] 13:00, 10 June 2009 (UTC)
 
==Escaping Escapes==
Anonymous user