Re: [basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Bridger Dyson-Smith
Ha ha, awesome Liam! Thank you for clarifying! Best, Bridger On Mon, Sep 9, 2019 at 9:37 PM Liam R. E. Quin wrote: > On Tue, 2019-09-10 at 02:59 +0200, Andreas Mixich wrote: > > I wonder why the serialization behaves that way. It does not make > > sense to > > me. If a user has the need to

Re: [basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Andreas Mixich
On Tue, Sep 10, 2019 at 3:37 AM Liam R. E. Quin wrote: > XML entities are expanded by he XML parser, so by the time XQuery (or > XSLT) sees the document they are gone. > Ah, yes, I totally forgot about that! Thanks for clarification!

Re: [basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Liam R. E. Quin
On Tue, 2019-09-10 at 02:59 +0200, Andreas Mixich wrote: > I wonder why the serialization behaves that way. It does not make > sense to > me. If a user has the need to escape XML, it should be thorough, > shouldn't it? XML entities are expanded by he XML parser, so by the time XQuery (or XSLT)

Re: [basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Bridger Dyson-Smith
Hi Andreas - I'm not sure (way outside of my wheelhouse :), but I think because arbitrary serialization can generate invalid XML, so having a character map makes the possible invalidity explicit? Now that I've typed that, I'm not sure if that captures the rational or not. :) In any case, here's

Re: [basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Andreas Mixich
I wonder why the serialization behaves that way. It does not make sense to me. If a user has the need to escape XML, it should be thorough, shouldn't it? On Mon, Sep 9, 2019 at 10:47 PM Liam R. E. Quin wrote: > On Mon, 2019-09-09 at 15:04 +0200, Andreas Mixich wrote: > > when serializing a

Re: [basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Liam R. E. Quin
On Mon, 2019-09-09 at 15:04 +0200, Andreas Mixich wrote: > when serializing a string, that contains literal XML with entities, > how do I pass through those entities unchanged? One way is to use a character map, as Bridger Dyson-Smith described. Sometimes another way can be to have a version of

Re: [basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Bridger Dyson-Smith
Hi Andreas - Have you tried using different serialization options? I.e., serialize.xq: ``` declare option output:method "xml"; declare option output:parameter-document "map.xml"; declare variable $input := "Lorem ipsum, dolor sit amet."; serialize($input) ``` map.xml: ```

[basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Andreas Mixich
Hi, when serializing a string, that contains literal XML with entities, how do I pass through those entities unchanged? Example: let $input := "Lorem ipsum dolor sit amet " return serialize($input) results in: pLorem ipsum dolor sit amet, ' consectetur adipisicing elit./p but I want: pLorem