Project

Profile

Help

Bug #4110

closed

processing-instruction does not contain character when input matches '^\s+[a-z]$'

Added by Sebastian Bulka over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2019-01-24
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6, 9.7, 9.8, 9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

When a string starts with whitespace, followed by exactly 1 readable character, neither @select nor <xsl:value-of> outputs the character in a <xsl:processing-instruction>.
When constructing a <xsl:element>, it is generated as expected.

Amount of whitespace seems to be irrelevant (also tried with some &#xa;).
Behaviour is as expected if the input has

  • no whitespace before the 'z'
  • whitespace after the 'z'
  • more than 1 readable character following

I tried setting @as='xs:string' (https://saxonica.plan.io/issues/3748), but that did not help.

Given:

  • whitespace_plus_char.xsl
  • Saxon-PE 9.6.0.7J or Saxon-PE 9.8.0.12

expected:

<?xml version="1.0" encoding="UTF-8"?><?s1 z?><?s2 z?><?s3 z?><w> z</w>

actual:

<?xml version="1.0" encoding="UTF-8"?><?s1?><?s2?><?s3?><w> z</w>

Files

whitespace_plus_char.xsl (690 Bytes) whitespace_plus_char.xsl Stylesheet generating the erroneous output Sebastian Bulka, 2019-01-24 17:43

Please register to edit this issue

Also available in: Atom PDF