We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the following schema:
<?xml version="1.0" encoding="utf-8"?> <xs:schema id="test" targetNamespace="urn:test" xmlns="urn:test" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="Test"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="Value" type="xs:string" use="required" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:schema>
In the method XmlSchemaClassGenerator.ClassModel.Generate(), the code will go through
XmlSchemaClassGenerator.ClassModel.Generate()
if (BaseClass != null) { ... else if (!string.IsNullOrEmpty(Configuration.TextValuePropertyName)) { ... } }
and also in
foreach (var property in Properties.GroupBy(x => x.Name)) { ... }
generating the following class with the Value attribute appearing twice.
... public partial class Test { [System.Xml.Serialization.XmlTextAttribute()] public string Value { get; set; } [System.Xml.Serialization.XmlAttributeAttribute("Value", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public string Value { get; set; } }
Command used: XmlSchemaClassGenerator.Console.exe -n "urn:test"=Test Test.xsd
XmlSchemaClassGenerator.Console.exe -n "urn:test"=Test Test.xsd
The text was updated successfully, but these errors were encountered:
Does using the --tvpn, --textValuePropertyName command line argument help (e.g. set to TextValue)?
--tvpn, --textValuePropertyName
TextValue
Sorry, something went wrong.
No branches or pull requests
Given the following schema:
In the method
XmlSchemaClassGenerator.ClassModel.Generate()
, the code will go throughand also in
generating the following class with the Value attribute appearing twice.
Command used:
XmlSchemaClassGenerator.Console.exe -n "urn:test"=Test Test.xsd
The text was updated successfully, but these errors were encountered: