Problem with validation in XSD element with fixed attibute

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with validation in XSD element with fixed attibute

biqll
Hi!
I found strange problem with validation rules.
I have XSD with 2 elements. Both of them have attribute fixed with value '123' and ' 123'
The first one validate OK but the second isn't.
Is this normal behavior?

I've attached test case for this issue.
TESTCase.ZIP

Best regards,
biqll
Reply | Threaded
Open this post in threaded view
|

Re: Problem with validation in XSD element with fixed attibute

Alessandro  Vernet
Administrator
Hi biqll,

Indeed, it looks like the schema validator we use (MSV) "doesn't like" fixed=" 123" (where the value starts with a space). Is this really something you really need? If you do and assuming it is valid in XML Schema, I think the way to go would for you to fix this in the MSV code, and we're not likely to look into such corner case in a library we use. If you decide to go this route, feel free to do a pull request against this fork of MSV we're using:

https://github.com/orbeon/msv

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet