On 28/09/2012 12:09, Gleb Gawriljuk wrote:
Sorry, forgot to provide the info: I am executing saxon 8.9 from a command line.

Until Saxon 9.2, the default when executing from the command line was indent=yes. You either need to change this (add !indent=no to the command line) or move to a more recent release.

Michael Kay
Saxonica

2012/9/28 Michael Kay <mike@saxonica.com>

Because of the way your mail is formatted, I can't actually see exactly what the problem is.

You don't say how you are running the query, e.g. whether it is from the command line, from within a tool like oXygen, or from a Java API such as XQJ or s9api. Most likely, you are running with the serialization parameter indent="yes", which explicitly gives Saxon the freedom to adjust the amount of whitespace between element nodes.

Michael Kay
Saxonica


On 28/09/2012 08:40, Gleb Gawriljuk wrote:
Hey,

I have the following problem:
On the XML: 

<?xml version="1.0" encoding="UTF-8"?>
<Student>
<StudentName>Max Mustermann</StudentName>
<StudentID>SID12345</StudentID>
</Student>

I execute the xQuery: 

let $x := doc('XML_PATH') return( if (not($x/Student and $x/Student/StudentName and $x/Student/StudentID)) then error() else $x/Student )

and get the resulting XML : 

<?xml version="1.0" encoding="UTF-8"?>
<Student>
 <StudentName>Max Mustermann</StudentName>
 <StudentID>SID12345</StudentID>
</Student>

which has additional whitespace before the child-notes. As in my working environment I can only compare the xml-files as strings this becomes a little problem for me.

Can anyone explain to me why this happens, or has someone a solution for it, so I get exactly the same xml.

Kind regards,
Gleb


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help



------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help