Donate Share

Saxon XSLT and XQuery Processor

Tracker: Bugs

5 Unwanted spaces in comments and processing instructions - ID: 913392
Last Update: Settings changed ( mhkay )

When the content of a comment or processing
instruction is generated as a sequence of text nodes, a
single space is incorrectly inserted between each text
node. This should happen only when the (new) select
attribute is used to generate the comment or PI.

Solution:

add the line

inst.setSeparator(new StringValue
(select==null ? "" : " "));

after compileContent(inst) in the compile() methods of
XSLComment and XSLProcessingInstruction.

Test cases added: whte22 and whte23

Michael Kay


Michael Kay ( mhkay ) - 2004-03-10 10:47

5

Closed

Fixed

Michael Kay

XSLT conformance

v7.9

Public


Comments ( 2 )

Date: 2004-03-29 09:31
Sender: stummb

Logged In: YES
user_id=924525

Whoopsi. I was a bit to fast. Didn't know about separator
attribute.


Date: 2004-03-29 09:11
Sender: stummb

Logged In: YES
user_id=924525

I have a very similar with function calls:

<?xml version="1.0" encoding="ISO-8859-1"?>
<stylesheet version="2.0"
xmlns="http://www.w3.org/1999/XSL/Transform"
xmlns:foo="bar">
<output method="text" encoding="ISO-8859-1" />

<template match="/">
<text>a</text>
<text>b</text>
<value-of select="foo:cmd()"/>
</template>

<function name="foo:cmd">
<text>a</text>
<text>b</text>
</function>

</stylesheet>

I think this should output "abab", but what I get is "aba b"


Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2004-03-31 14:52 mhkay
resolution_id None 2004-03-31 14:52 mhkay
close_date - 2004-03-31 14:52 mhkay