polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Stax XML serialization format...
Date Mon, 13 Jul 2015 12:50:39 GMT
Good point!! There is similar issue around escaping in JSON for values in
maps, which needs to be addressed. I guess the same mechanism could be used
to escape XML tagnames as well.


Niclas



On Mon, Jul 13, 2015 at 1:49 PM, Paul Merlin <paul@nosphere.org> wrote:

> Hey,
>
> Java allow UTF-8 characters in method names.
> This could lead to illegal characters in tag namesif Value Properties
> accessor name is used.
>
> Moreover, Map keys can be something else than a String, they can be a
> Number, a Date et...
>
> BTW, I'm not using the StAX serialization in any of my apps.
>
> /Paul
>
>
> Kent Sølvsten a écrit :
> > Illegal characters :-)
> > Den 12/07/2015 20.27 skrev "Kent Sølvsten" <kent.soelvsten@gmail.com>:
> >
> >> Not able to analyse from My holliday on crete.  But: provided we wont
> run
> >> into trouble with illegal charterselskaber in XML elements i agree . I
> >> Thing the default should be changed for 3.0 though.
> >>  Den 12/07/2015 16.58 skrev "Niclas Hedhman" <niclas@hedhman.org>:
> >>
> >>> Gang,
> >>> The StaxValueSerialization format is very verbose, and possibly only
> >>> suitable with an XML browser (i.e. a regular browser with a CSS to
> make it
> >>> into tables)
> >>>
> >>> From testcase;
> >>> <?xml version="1.1"
> >>>
> >>>
> encoding="utf-8"?><object><field><name>number</name><value>42</value></field><field><name>nullString</name><value><null></null></value></field><field><name>emptyString</name><value></value></field><field><name>stringList</name><value><array></array></value></field><field><name>anotherNull</name><value><null></null></value></field><field><name>anotherListNull</name><value><null></null></value></field><field><name>anotherListEmpty</name><value><array></array></value></field><field><name>testEnum</name><value>somevalue</value></field><field><name>foo</name><value><object><field><name>_type</name><value>org.qi4j.test.value.AbstractValueCompositeSerializationTest$FooValue</value></field><field><name>bar</name><value></value></field></object></value>
> >>>
> >>> <snip/>
> >>>
> >>> I doubt anybody is using it, and my question is whether it should be
> kept
> >>> at all, or I should do the same as I did with JSON Maps format, where
> the
> >>> current format is default, and that a Options flag indicates a leaner
> >>> format, where the tag name is the property name and the element value
> is
> >>> the value.
> >>>
> >>> WDYAT?
> >>>
> >>> Cheers
> >>> --
> >>> Niclas Hedhman, Software Developer
> >>> http://zest.apache.org - New Energy for Java
> >>>
> >
>



-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message