Re: [basex-talk] Inserting a two double quoted attribute

2020-07-27 Thread Christian Grün
> With XML markup, to have an attribute value delimited by double quotes
> but to also use double quotes inside the attribute value, you need to
> use an entity reference or character reference in the attribute value
>3.00
> to escape the double quote(s).

If you have full control over the query generation process, you could
also use an XQuery 3.1 String Constructor (``[ ... ]``) for the XML
snippet and simple quotes for the attribute value:

let $message:= ``[3.00]``
return insert nodes fn:parse-xml-fragment($message)
  as last into doc('testingdb/testing.xml')

Your query could be simplified to…

let $node := 3.00
return insert node $node into doc('testingdb/testing.xml')

…but I guess you have reasons for using parse-xml-fragment.


Re: [basex-talk] Inserting a two double quoted attribute

2020-07-27 Thread Martin Honnen

Am 27.07.2020 um 12:01 schrieb Ramzi Hammouda:

Hello BaseX team,

I need to insert a node that has an attribute with two double quotes.

An example:

let $message:='3.00'


With XML markup, to have an attribute value delimited by double quotes
but to also use double quotes inside the attribute value, you need to
use an entity reference or character reference in the attribute value
  3.00
to escape the double quote(s).



return insert nodes fn:parse-xml-fragment($message)

as last into doc('testingdb/testing.xml')

The GBP attribute is with two “ so it gives the error:

SAX: file://C:/Program$20Files(86)/BaseX/(Line1)
: whitespace expected,
attribute name found.

How can I solve the issue?


P/Respectons ensemble l'environnement. N'imprimez ce message que si
nécessaire. //Let's respect the environment together. Only print this
message if necessary./




[basex-talk] Inserting a two double quoted attribute

2020-07-27 Thread Ramzi Hammouda
Hello BaseX team,

I need to insert a node that has an attribute with two double quotes.

An example:
let $message:='3.00'
return insert nodes fn:parse-xml-fragment($message)
as last into doc('testingdb/testing.xml')

The GBP attribute is with two " so it gives the error:
SAX: 
file://C:/Program$20Files(86)/BaseX/(Line1):
 whitespace expected, attribute name found.

How can I solve the issue?

P Respectons ensemble l'environnement. N'imprimez ce message que si n?cessaire. 
Let's respect the environment together. Only print this message if necessary.