This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4160 - Static typing of fn-normalize-space0args-1
Summary: Static typing of fn-normalize-space0args-1
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0.2
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-09 08:26 UTC by Tim Mills
Modified: 2010-03-16 15:55 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2007-01-09 08:26:09 UTC
In the query below, the first call to normalize-space expects string?, but the actual argument is statically typed as string*.

(:*******************************************************:)
(:Test:fn-normalize-space0args-1:)
(:Written By:Joanne Tong:)
(:Date:2005-09-23T15:54:03-04:00:)
(:Purpose:Test normalize-space without argument:)
(:*******************************************************:)

(: insert-start :)
declare variable $input-context external;
(: insert-end :)

$input-context//doc/normalize-space(a[normalize-space() = 'Hello, How are you?'])
Comment 1 Carmelo Montanez 2007-03-15 14:46:00 UTC
Hey Tim:

Thanks for the comment.  Looks as though this test is intended to work as
written and usage of the context item.  Please comment further if you need.

Thanks,
Carmelo
Comment 2 Tim Mills 2007-03-15 14:52:39 UTC
a[normalize-space() = 'Hello, How are you?'])

has type string*

$input-context//doc/normalize-space( string* ) fails to typecheck.

The test should be:

$input-context//doc/normalize-space(zero-or-one(a[normalize-space() = 'Hello, How are you?']))

to avoid static typing errors.
Comment 3 Carmelo Montanez 2007-03-15 18:42:42 UTC
Hey Tim:

Test fixed as suggested.

Thanks,
Carmelo