value of top level element not displayed in generated form
I have noticed that when creating a filled form from an xml document the value of a top level element (if it's a type such as xs:integer or a simpleType) is not displayed.
I have two files. The first is test.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="myThing" type="xs:integer"/>
</xs:schema>
The second file is myTest.xml:
<myThing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="test.xsd">
1974
</myThing>
The value 1974 is not shown on the generated form after processing with xsd2html2xml. I am using version 3.3. Have I made a mistake somewhere?
That doesn't have to do with it being the top-level element. It's because of the whitespace around the integer. Change it to ...>1974</... and it works.
Doh! I thought I was missing something. Thanks.
You're welcome. Let's leave this one open, because according to the specification, your XML with the whitespace is valid.