Commit Graph
15 Commits
Author SHA1 Message Date
Duncan Mak 8fa6e766dd Add MIT license to System.XML.DLL
svn path=/trunk/mcs/; revision=30055
2004-06-21 18:07:31 +00:00
Atsushi Eno a5eaabf6f1 2004-06-18 Atsushi Enomoto <[email protected]>
* CodeIdentifier.cs, CodeIdentifiers.cs, MapCodeGenerator.cs,
	  SerializationCodeGenerator.cs, SerializationSource.cs,
	  TypeTranslator.cs, XmlAttributeOverrides.cs, XmlCustomFormatter.cs,
	  XmlSerializationReader.cs, XmlSerializationWriter.cs,
	  XmlSerializer.cs, XmlTypeMapMemberElement.cs, XmlTypeMapping.cs
	  : Globalization fixes.
	    In XmlCustomFormatter.GenerateToXmlString() time was not
	    generated correctly.
	    Replaced all CRLF XmlAttributeOverrides.cs into LF.

svn path=/trunk/mcs/; revision=29865
2004-06-18 09:50:34 +00:00
Lluis Sanchez aae87fab03 * MapCodeGenerator.cs, SoapCodeExporter.cs: Generate the same XmlInclude
attributes that MS.NET generates.
	* SerializationCodeGenerator.cs: Avoid duplicate generation of maps in the
	  same reader/writer.
	* XmlCodeExporter.cs: Added support for ignore flag in maps and members.
	* XmlReflectionImporter.cs: Changed GetReflectionMembers to match
	  MS.NET member ordering. Patch by David Taylor.
	* XmlSchemaImporter.cs: When generating a choice member, set the ignore
	  flag. The generated enum must also not be included in the schema.
	* XmlTypeMapMember.cs: Added ignore flag.
	* XmlTypeMapping.cs: The AttributeMembers property now returns the
	  attributes in the correct order.

svn path=/trunk/mcs/; revision=29172
2004-06-10 08:47:59 +00:00
Lluis Sanchez 285cd2dcc8 * XmlSerializationReader.cs: Support schamea instance namespaces other than
the 2001 one when reading the xsi type.
	* MapCodeGenerator.cs: Take into account that the root namespace and element
	  name may have changed from one export to another of the same type. In
	  this case the class attributes need to be regenerated.
	* SoapCodeExporter.cs, XmlCodeExporter.cs: Take the enum name from XmlType,
	  not ElementName. Idem for namespace.
	* XmlReflectionImporter.cs: Set nullable property of XmlTypeMapping.
	* XmlRootAttribute.cs: Default value for nullable is true.
	* XmlSchemaImporter.cs: The root name for a class may change in some
	  scenarios (for example, when the type is initially exported as part of
	  another type and later exported as a root type).
	* XmlSerializationReader.cs: In GetXsiType(), if the type attribute is not
	  found using the standard namespace, try getting the type using
	  the 2000/10 and 1999 namespaces.
	* XmlTypeMapping.cs: Added IsNullable property. Updated SetRoot method.

svn path=/trunk/mcs/; revision=28711
2004-06-02 18:16:39 +00:00
Lluis Sanchez c946a0cebc * CodeIdentifier.cs: Limit the length of identifiers.
* MapCodeGenerator.cs: Do not generate base class if it is an XmlNode.
	  Generate types using GetDomType, so if the type is an array, it creates
	  the correct combination of types.
	* SerializationCodeGenerator.cs, XmlTypeMapping.cs: When trying to parse
	  an enum, if the string is empty and the enum has [Flags], then return 0
	  as value. This fixes bug #55509.
	* XmlSchemaImporter.cs: Added check for redefines of attribute groups. They
	  are not supported. Another check: a simple type cannot be enum if it does
	  not have any enum facet.
	  And another fix: use string as default type for attribtues.
	* XmlSchemas.cs: Fixed search for schema elements. An schema may import
	  other schemas. An imported schema would not be in the table, but its
	  elements (although from another namespace) would be in the schema that
	  imported it. So, we need know to check for every schema in the table.
	* XmlSerializer.cs: Added environment variable to help debugging code
	  generator output.

svn path=/trunk/mcs/; revision=23957
2004-03-12 15:57:13 +00:00
Lluis Sanchez 5871bdbbd1 * MapCodeGenerator.cs: Added IncludeMetadata property, which returns a list
of XmlInclude attributes needed for the service class.
	  IsMapExported: Removed check for object type, since it can now be exported.
	  SetMapExported: Use the type name as key, since different importers may
	  be used to create a map for the same type.
	  GenerateClassInclude: Updated signature.
	* SoapCodeExporter.cs: Moved management of IncludeMetadata to MapCodeGenerator.
	  GenerateClassInclude(): Updated signature.
	* SoapReflectionImporter.cs: Support SoapIncludeAttribute in array members.
	  Implemented IncludeTypes.
	* XmlCodeExporter.cs: Moved management of IncludeMetadata to MapCodeGenerator.
	  GenerateClassInclude(): Updated signature.
	* XmlMemberMapping.cs: Added missing property.
	* XmlReflectionImporter.cs: GetReflectionMembers must be private.
	  Implemented IncludeTypes().
	* XmlSchemaExporter.cs: Added support for exporting typeof(object).
	* XmlSchemaImporter.cs: Changed the implementation of ImportDerivedTypeMapping.
	  Now, it does a regular import and then assign the required base class to
	  the imported map. In this way it is possible to assign a base type for a
	  map that was previously imported without a base type.
	* XmlTypeMapping.cs: Added internal method SetRoot().

svn path=/trunk/mcs/; revision=23510
2004-02-27 00:03:45 +00:00
Lluis Sanchez af31a18a06 * MapCodeGenerator.cs: Modified some methods to make them easier to reuse.
Those are basically methods to add custom attributes to element and
	  attribute members.
	* SoapCodeExporter.cs: Track changes in MapCodeGenerator.
	* XmlCodeExporter.cs: Better support for custom attribute generation for
	  method parameters.
	* XmlCustomFormatter.cs: Added null check.
	* XmlSchemaImporter.cs: do not set IsOptionalValueType property to
	  attributes that are required.
	* XmlSerializationReaderInterpreter.cs: Method parameters may be serialized
	  as attributes.

svn path=/trunk/mcs/; revision=23131
2004-02-16 15:40:15 +00:00
Lluis Sanchez d2f63bb61f * MapCodeGenerator.cs: Changed some methods to make them easier to reuse.
* TypeTranslator.cs: NMTOKENS, ENTITIES and IDREFS must be mapped to
	  string, not string[].
	* XmlCodeExporter.cs: AddMappingMetadata(): improved attribute generation
	  for array parameters. In general, improved generation of schema Form
	  property.
	* XmlMemberMapping.cs: Added Form property.
	* XmlReflectionImporter.cs: Types that inherit from other types cannot be
	  simple types. Added a check for this.
	* XmlSchemaExporter.cs: several fixes: better generation of IsMixed and
	  Form. The key used to determine if a map has been already generated must
	  include the XmlType, since there can be two xml types with the same CLR
	  type and namespace (for example, they may differ in the Form property).
	* XmlSchemaImporter.cs: When getting the TypeData for a schema element,
	  also return the corresponding map. There can be two maps that have the
	  same TypeData, so given a TypeData is not always possible to get the
	  correct corresponding map (for example two arrays that only differ in the
	  Form of the item).
	* XmlTypeMapping.cs: Added method to set if a map can represent a simple
	  type or not.

svn path=/trunk/mcs/; revision=22968
2004-02-11 11:27:23 +00:00
Lluis Sanchez 4160809c3b * MapCodeGenerator.cs: Added helper method for generating an attribute
parameter of type enum.
	* XmlAttributeAttribute.cs: little fix.
	* XmlCodeExporter.cs: Support XmlAnyAttribute when generating attributes
	  for method parameters.
	* XmlMemberMapping.cs: Improved support for members of type "any".
	* XmlReflectionImporter.cs: Improved assignment of the attribute form.
	  If the namespace is explicitly specified, then the form should be
	  qualified. Also fixed issues with the namespace assigned to attributes.
	  This should fix bug #53384.
	* XmlSchemaExporter.cs: ExportMembersMapping(): improved support for
	  methods that return values of type "any". Changed the methods
	  AddSchemaArrayElement and AddSchemaElement, so instead of adding the
	  element, return it, and the caller must add it to the collection.
	  Other fixes in attribute generation.
	* XmlSchemaImporter.cs: ImportAnyType(): if a type name is provided,
	  generate the AnyType mapping from the type described in the schema.
	  Small fixes regarding IsMixed property of complex types (it means that
	  the type can contain text, so the XmlTextAttribute must be generated).
	* XmlSerializationReaderInterpreter.cs: Reading of members by-order must
	  be only used in the bare+encoded format.

svn path=/trunk/mcs/; revision=22533
2004-01-27 12:43:22 +00:00
Lluis Sanchez b46db4ea02 * MapCodeGenerator.cs, XmlSchemaImporter.cs: Attributes are allways optional,
so a 'specified' member has always to be generated.
	* TypeData.cs: Fixed check for value type.

svn path=/trunk/mcs/; revision=22309
2004-01-20 19:18:46 +00:00
Lluis Sanchez 648ca0b963 * XmlSerializationReaderInterpreter.cs, XmlSerializationWriterInterpreter.cs,
XmlTypeMapMember.cs, MapCodeGenerator.cs, SoapCodeExporter.cs, TypeData.cs,
	  XmlCodeExporter.cs, XmlReflectionImporter.cs, XmlSchemaExporter.cs,
	  XmlSchemaImporter.cs, XmlSerializationReaderInterpreter.cs,
	  XmlSerializationWriterInterpreter.cs, XmlTypeMapMember.cs:
	  Added support for value specifiers members. This fixes bug #53024.

svn path=/trunk/mcs/; revision=22308
2004-01-20 18:18:25 +00:00
Lluis Sanchez 35c1a12ab0 * MapCodeGenerator.cs: Use type namespace instead of root namespace as
default namespace for members.
	* XmlCodeExporter.cs: Fixed generation of XmlRootAttribute.
	* XmlReflectionImporter.cs: Fixed the assignment of root and type
	  namespaces.
	* XmlSchemaExporter.cs: Use type namespace instead of root namespace as
	  default namespace for members. In AddSchemaElement, if the element is
	  a root element never use a "ref" attribute.
	* XmlSchemaImporter.cs: Fixed issue when importing root elements.

svn path=/trunk/mcs/; revision=22064
2004-01-14 17:30:50 +00:00
Lluis Sanchez a88fae3a5d * MapCodeGenerator.cs: Added support for [Flags] enum.
* XmlCodeExporter.cs: Do not add XmlElement attributes if the member is Any.
	* XmlSchemaImporter.cs: Implemented ImportAnyType(). Improved import of
	  encoded array type. Added support for enums with [Flags].
	  In encoded format, unqualified types are schema types by default.

svn path=/trunk/mcs/; revision=21072
2003-12-12 17:04:59 +00:00
Lluis Sanchez 9438297164 * MapCodeGenerator.cs: Made MapCodeGenerator internal.
svn path=/trunk/mcs/; revision=19084
2003-10-15 18:11:33 +00:00
Lluis Sanchez bf5fac805d * MapCodeGenerator.cs: New file. Moved here all code that is common
between XmlCodeExporter and SoapCodeExporter.
	* SoapCodeExporter.cs: Implemented.
	* XmlCodeExporter.cs: Moved common code to MapCodeGenerator.
	* XmlSerializationReaderInterpreter.cs: Fixed problem when reading
	  encoded bare parameter list.
	* XmlTypeMapping.cs: Added method for getting member element by index.

svn path=/trunk/mcs/; revision=19069
2003-10-15 08:18:04 +00:00