Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

xsd.exe and attribute group

$
0
0

Hello, 

I have a problem, maybe it is a duplicate, in this case my apologies.

I have a xsd like this:

<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:pi="TestNested" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="TestNested"><xs:attributeGroup name="LL"><xs:attribute name="LL_A" use="required"><xs:simpleType><xs:restriction base="xs:string"></xs:restriction></xs:simpleType></xs:attribute></xs:attributeGroup><xs:attributeGroup name="AG"><xs:attribute name="AG_A" use="required"><xs:simpleType><xs:restriction base="xs:string"></xs:restriction></xs:simpleType></xs:attribute><xs:attributeGroup ref="pi:LL" /></xs:attributeGroup><xs:element name="E"><xs:complexType><xs:attributeGroup ref="pi:AG"/></xs:complexType></xs:element></xs:schema>

When I try to create a class with xsd test.xsd /c /l:vb, it generates a class like this:

<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0"),  _
 System.SerializableAttribute(),  _
 System.Diagnostics.DebuggerStepThroughAttribute(),  _
 System.ComponentModel.DesignerCategoryAttribute("code"),  _
 System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true, [Namespace]:="TestNested"),  _
 System.Xml.Serialization.XmlRootAttribute([Namespace]:="TestNested", IsNullable:=false)>  _
Partial Public Class E

    Private aG_AField As String

    '''<remarks/><System.Xml.Serialization.XmlAttributeAttribute()>  _
    Public Property AG_A() As String
        Get
            Return Me.aG_AField
        End Get
        Set
            Me.aG_AField = value
        End Set
    End Property
End Class

As you can see there is no reference to LL_A attribute, how can I solve this?

Thank you,

Antonino Perricone



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>