Context Menu feature for Gloabal Elements "Generate Sample XML"

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
When using the XML Schema Explorer in Vistual Stuido 2010, the otion to generate a smale XML is given. The file it produces doesnt conform to the schema for strings using a pattern restriction. I have searched the forums and KB, but have only
found reference to this in the context menu description, and nothing further to help to understand why this partially ignores the XSD when producing a sample file.
Any ideas on why this might not work (theres an intersting use case to be able to general meaningless, but validated sample XMLs for XSDs)?
If you create a simple XSD including the type below and an element of this type, the sample XML will provide a string which ignores the patter restriction.
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <<span style="color:#A31515; xs<span style="color:Blue; :<span style="color:#A31515; simpleType <span style="color:Red; name<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; MyStringType<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; xs<span style="color:Blue; :<span style="color:#A31515; restriction <span style="color:Red; base<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; xs:string<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; xs<span style="color:Blue; :<span style="color:#A31515; pattern <span style="color:Red; value<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; ([a-cA-C0-7]){22}<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; xs<span style="color:Blue; :<span style="color:#A31515; restriction<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; xs<span style="color:Blue; :<span style="color:#A31515; simpleType<span style="color:Blue; >
[/code]
<font face="Consolas" size="2" color="#0000ff <font face="Consolas" size="2" color="#0000ff <font face="Consolas" size="2" color="#0000ff

</font></font></font><font face="Consolas" size="2" color="#0000ff <font face="Consolas" size="2" color="#0000ff

</font></font><font face="Consolas" size="2" color="#0000ff

</font>


View the full article
 
Back
Top