- From: David A. Lee <dlee@calldei.com>
- Date: Sat, 19 Sep 2009 08:27:45 -0400
- To: Michael Sokolov <sokolov@ifactory.com>
- CC: "'Jim Tivy'" <jimt@bluestream.com>, xml-dev@lists.xml.org, "'XProc Dev'" <xproc-dev@w3.org>
- Message-ID: <4AB4CE41.7080009@calldei.com>
Michael Sokolov wrote: > > I have sometimes needed to be able to serialize a heterogeneous > sequence of items which may be either atomic values or nodes. I'm not > sure, but this may be what Jim is driving at. It is OK for my purpose > if the values do not carry intrinsic type information and are simply > text in the serialization, but what is important in this case is to > distinguish between the items in the sequence: they have to remain > distinct even if they are adjacent text items, say. > > maybe this all just goes without saying, but somehow I couldn't resist > saying it anyhow > > -Mike > > This new specification would attempts to solve your problem (Mike) http://xml.calldei.com/XDMSerialize because it would preserve sequences and not do "sequence normalization" on text nodes. ("A" , "B" , 1 , 2 , <foo/>} will be preserved as a sequence of 5 items, not turned into "AB12 <foo/>" as the current XDM serialization spec does. But it likely will not solve the problem Jim was describing (which is already solved). Why ? I haven't written it yet ... waiting for some more arguments/discussions on the use cases first. But the direction I'm going is likely going to require a 'layer' of wrapped XML in order to preserve the XDM information such as items and types. This implies that to use in the context Jim was suggesting wouldn't work because there would be an outer XML node containing the HTML nodes. Thus the results would have to be 'unwrapped' before they could be used in place in JSP. In which case were back to the same problem. This does bring to mind that perhaps there is a desire for multiple text serialization formats, such that Jim's use case would work ... but I think I will have enough problems coming up with a single format thats acceptable to enough people and use cases. Especially considering that Jim's particular case is already solved (by simply concatenating the text serialization of each HTML node), I doubt another spec is needed for that use case. -David David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org 812-482-5224
Received on Saturday, 19 September 2009 12:33:42 UTC