whitespace pruning while storing an XML doc to BaseX, how to disable
Hi, Does BaseX attempt some whitespace pruning on the XMLs being stored; if yes, how to get BaseX not to do so. On the wire, at the time request reaches BaseX, the XML is like: ..<xsl:for-each select="LINK"> ...<xsl:if test="A = 'TOKEN'"> ....insert into ....MYTABLE(VERSION) ....values ('LATEST'); ...</xsl:if> . in above is a space character, note the terminating xsl:if is on a line of its own. What BaseX stores is: <xsl:for-each select="LINK"> <xsl:if test="A = 'TOKEN'">insert into MYTABLE(VERSION) values ('LATEST');</xsl:if> </xsl:for-each> As you can see, BaseX has not persisted/stored the incoming XML as-is. I do not want this intelligent pruning since it breaks stuff for me. Thanks.
I use JAX-RX server, which does not have the option -w available/listed to presreve whitespace as-is. So, how to preserve XML files being loaded to BaseX using JAX-RX as-is. ---------- Forwarded message ---------- From: software developer <computer.software.developer@gmail.com> Date: Tue, Jun 21, 2011 at 3:33 PM Subject: whitespace pruning while storing an XML doc to BaseX, how to disable To: basex-talk@mailman.uni-konstanz.de Hi, Does BaseX attempt some whitespace pruning on the XMLs being stored; if yes, how to get BaseX not to do so. On the wire, at the time request reaches BaseX, the XML is like: ..<xsl:for-each select="LINK"> ...<xsl:if test="A = 'TOKEN'"> ....insert into ....MYTABLE(VERSION) ....values ('LATEST'); ...</xsl:if> . in above is a space character, note the terminating xsl:if is on a line of its own. What BaseX stores is: <xsl:for-each select="LINK"> <xsl:if test="A = 'TOKEN'">insert into MYTABLE(VERSION) values ('LATEST');</xsl:if> </xsl:for-each> As you can see, BaseX has not persisted/stored the incoming XML as-is. I do not want this intelligent pruning since it breaks stuff for me. Thanks.
Hi, please check our documentation: http://docs.basex.org/wiki/Options what you need is the CHOP option when you create your database. Cheers, Dimitar Am Dienstag 21 Juni 2011, 16:33:20 schrieb software developer:
Hi,
Does BaseX attempt some whitespace pruning on the XMLs being stored; if yes, how to get BaseX not to do so.
On the wire, at the time request reaches BaseX, the XML is like: ..<xsl:for-each select="LINK">
...<xsl:if test="A = 'TOKEN'"> ....insert into ....MYTABLE(VERSION) ....values ('LATEST'); ...</xsl:if>
. in above is a space character, note the terminating xsl:if is on a line of its own.
What BaseX stores is: <xsl:for-each select="LINK"> <xsl:if test="A = 'TOKEN'">insert into MYTABLE(VERSION) values ('LATEST');</xsl:if> </xsl:for-each>
As you can see, BaseX has not persisted/stored the incoming XML as-is. I do not want this intelligent pruning since it breaks stuff for me.
Thanks. _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
participants (2)
-
Dimitar Popov -
software developer