Community
Participate
Working Groups
Created attachment 176724 [details] Sample schema To recreate the problem: - place the attached schema in a workspace project (if using a simple project, add the validation builder) - right click the schema and select Generate->XML... - use the default values in the wizard - click Finish The generator produces an XML instance with the following validation errors: Description Resource Path Location Type cvc-datatype-valid.1.2.1: '0' is not a valid value for 'base64Binary'. Test.xml TestBase64 line 3 XML Problem cvc-type.3.1.3: The value '0' of element 'tns:Test' is not valid. Test.xml TestBase64 line 3 XML Problem
The problem code is in org.eclipse.wst.xsd.contentmodel.internal.XSDTypeUtil. The default value provided for base64Binary is the literal string 0, which is not a valid base64 value. The solution seems to be to encode the literal string 0 as base64, which is the literal string MA==.
Created attachment 176728 [details] New failing JUnit Apply to org.eclipse.wst.xsd.core.tests.
Created attachment 176729 [details] Patch Apply to org.eclipse.wst.xsd.core.
Hi Nitin, please review and consider approving this fix for WTP 3.0.5 patches.
Committed Patch to R3_0_5_patches.
Verified. Closing.