Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

value of top level element not displayed in generated form #21

Open
kgi-github opened this issue Apr 5, 2019 · 3 comments
Open

value of top level element not displayed in generated form #21

kgi-github opened this issue Apr 5, 2019 · 3 comments

Comments

@kgi-github
Copy link

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?

@MichielCM
Copy link
Owner

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.

@kgi-github
Copy link
Author

Doh! I thought I was missing something. Thanks.

@MichielCM
Copy link
Owner

You're welcome. Let's leave this one open, because according to the specification, your XML with the whitespace is valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants