[Mono-list] unable to compile schema
"Manuel V. Santos López"
mvsl@telefonica.net
Fri, 27 Aug 2004 19:58:18 +0200
Try changing the schemaLocation for a valid one.
> <!-- include address constructs -->
> <include
> schemaLocation="http://www.example.com/schemas/address.xsd"/>
I tried schemaLocation="address.xsd" after creating address.xml
in the same directory of the first xsd file and it worked.
The code generated was:
//
------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 1.1.4322.573
//
// Changes to this file may cause incorrect behavior and will be
lost if
// the code is regenerated.
// </autogenerated>
//
------------------------------------------------------------------------------
//
//This source code was auto-generated by MonoXSD
//
namespace Schemas {
/// <remarks/>
[System.Xml.Serialization.XmlType(Namespace="http://www.example.com/IPO"),
System.Xml.Serialization.XmlRoot("purchaseOrder",Namespace="http://www.example.com/IPO")]
public class PurchaseOrderType {
/// <remarks/>
public Address shipTo;
/// <remarks/>
public Address billTo;
/// <remarks/>
public string comment;
/// <remarks/>
[System.Xml.Serialization.XmlArrayItem(ElementName="item",IsNullable=false)]
public ItemsItem[] items;
/// <remarks/>
[System.Xml.Serialization.XmlAttribute(DataType="date")]
public System.DateTime orderDate;
[System.Xml.Serialization.XmlIgnore()]
public bool orderDateSpecified;
}
/// <remarks/>
[System.Xml.Serialization.XmlType(Namespace="http://www.example.com/IPO")]
public class Address {
/// <remarks/>
public string name;
/// <remarks/>
public string street;
/// <remarks/>
public string city;
}
/// <remarks/>
[System.Xml.Serialization.XmlType(Namespace="http://www.example.com/IPO")]
public class ItemsItem {
/// <remarks/>
public string productName;
/// <remarks/>
[System.Xml.Serialization.XmlElement(DataType="positiveInteger")]
public string quantity;
/// <remarks/>
public decimal USPrice;
/// <remarks/>
public string comment;
/// <remarks/>
[System.Xml.Serialization.XmlElement(DataType="date")]
public System.DateTime shipDate;
[System.Xml.Serialization.XmlIgnore()]
public bool shipDateSpecified;
/// <remarks/>
[System.Xml.Serialization.XmlAttribute()]
public string partNum;
}
}
Hope it works for you.
Greetings,
Manuel V. Santos López