Saxon 8, validating

P

Peter Gerstbach

Hi,

I use Saxon 8 to transform a xml document with a XSLT 2.0 stylesheet.
But in my result file there are many blank lines which should not be
there. I assume that Saxon does not validate the document against the
dtd and therefore does not know that there are no mixed elements. Saxon
seems to interpret all the line feeds and the indents. But they exist
just for the nice looking.

It should be possible to turn on validating by giving the "-v" option,
but this does not work (there are the same blank lines) nor is there an
error message, that validating failed.

Does anybody succeeded by using the -v option?

Peter
 
D

David Carlisle

You didn't say which version of saxon 8 you have (the free saxon 8-B
version is not schema-aware) However in either version you can do as you
do in xslt1 and add
<xsl:strip-space elements="*"/>
to your stylesheet to remove the unwanted text nodes.


David
 
P

Peter Gerstbach

David said:
You didn't say which version of saxon 8 you have (the free saxon 8-B
version is not schema-aware) However in either version you can do as you
do in xslt1 and add
<xsl:strip-space elements="*"/>
to your stylesheet to remove the unwanted text nodes.

Yes, I use the free one. I didn't know, it is not schema-aware.
The thing with strip-space works. I've never heared of this element
before... thanks!

I have one more question: do you know of a bug, which causes to strip
off the first 2 characters in the result file?
When I send the output to the terminal it works fine.

Peter
 
R

Robin Johnson

Peter Gerstbach said:
I have one more question: do you know of a bug, which causes to strip
off the first 2 characters in the result file?
When I send the output to the terminal it works fine.

I use Saxon 8.0-B (good choice) and have encountered no such bug, nor
does anything like that seem to be listed on the bug list at
saxon.sf.net.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top