xsd

How to use concurrently different version of the same classes

Hi, I have to provide an interface to a set of web services for which I have generated the code stubs and object binding. Many of the transactions share a common object model and thus a large part of the generated code overlaps. Normally this would not be a concern as I would just re-use the same code since the wsdl would link the sam...

xsd:Import doesn't work in WSDL?

Hi, When put below wsdl into my VS2010 project I got a "Type 'urn:listing3:Phone' is not declared." error. Looks like the xsd:import doesn't work, why? <?xml version="1.0" ?> <wsdl:definitions targetNamespace="urn:listing2" xmlns:tns="urn:listing2" xmlns:listing3="urn:listing3" xmln...

XSD: type of column x in table y is too small to hold data

I am generating an XSD file based on the columns in my xml. I give them all the type, "xs:string". Then I try to import the file into my database using .NET with SQLbulk import, but for some fields are to small. I get the message, "type of column x in table y is too small to hold data" What type should I use for large amount of text (s...

XSD anytype and JAXB

Hello, I have an xsd definition (from www.tmforum.org ossj common api v1.5) <element name="primaryKey" nillable="false"> <complexType mixed="false"> <complexContent mixed="false"> <extension base="anyType"/> </complexContent> </complexType> </element> and would like to ...

Data Flow Task, XML Source error

I am developing an SSIS application with VS and SQL Server 2008. I am still new to SSIS, however. I have successfully created one project with an XML Task connected to a Data Flow Task. But as part of this same solution I created an identical project with XML Task connected to Data Flow Task. From what I can see, the only difference b...

Why is XmlNode.OuterXml crashing my entire IIS application?

I am running into a situation where my IIS App Pool actually crashes when I try to get the outer XML of an XML input. Here is the code that I inherited : var tempNamespace = xmlToValidate.OwnerDocument.CreateAttribute("xmlns"); tempNamespace.Value = xsdFileName; xmlToValidate.Attributes.Append(tempNamespace); //Have to create fragment...

what does "When <simpleContent> is used, the base type must be a complexType whose content type is simple..." mean?

heres the whole error I keep getting from xerces.... When is used, the base type must be a complexType whose content type is simple, or, only if restriction is specified, a complex type with mixed content and emptiable particle, or, only if extension is specified, a simple type. 'string' satisfies none of these conditions. I thought ...

can we validate date from XSD in MM-DD-YYYY format ?

can we specify MM-DD-YYYY format date restriction in XSD on element which we want to restrict ? ...

JAXB to be create a map from XSD

When JAXB generates this, it create the OtherProperties as a List. How can I configure the XSD so it is generated as a Map? <xsd:element name="OtherProperties" minOccurs="0"> <xsd:complexType> <xsd:sequence minOccurs="0" maxOccurs="unbounded"> <xsd:element name="Property"> ...

Is there a XSD Schema of Activity Stream feed?

I am trying to map Activity Stream feed to Java entity beans using JAXB. If there were a XSD schema of ActivityStream, it would be so much easier. Does anyone know if there exists a XSD schema of ActivityStrea.ms? ...

OpenCms : How to access xml element content from multiple schema files.

Hi, I have a doubt regarding xml structured content in OpenCms. I have two XML schemas, one for editing the top menus (menus are same across all the pages) and another schema for editing the page content. In the template jsp file i need to access xml element contents from both the schema files. How to go for that? do i have to specify s...

Make a second element on XSD required when a first element is used

Hi, I have a simple XML file, with 3 basic elements. The first one is required (minOccurs=1) and the second and third are optional. However, if the second element is used, then I would like the make the third one required. He's the XML: <?xml version="1.0" encoding="utf-8" ?> <resultado> <consulta fonte="1" origem="Origem">0</...

Generating XML with an xsd in VS2010 using LINQ

I think the title says it all. I've used Linq2SQL lots and am familiar with most of the concepts (up to and including extending an ObjectContext) but with regards to Linq2XML, I'm a little lost. I now have a need to generate some complex XML and I'd like to use the simplicity of LINQ. Previously, I've used XMLDocuments and programatic...

Oracle Table to XSD

How do I create XSD from an Oracle Table? Are there any tools available for this? ...

Converting a XSD date xs:dateTime to an Oracle Date

Hello, I need to convert a date from this format: 2002-10-10T12:00:00-05:00 (xs:dateTime as defined in XML) to an Oracle date. I'm used to using this in PL/SQL: to_date('date here', 'yyyymmdd'), is there a way to convert this while keeping the time zone info? Thanks ...

Use XSD to validate a CSV value?

I have an xml file with an attribute that looks something like this: <Element attribute="1234,2345,3413,6532" /> I need a way to validate that the attribute value is a comma separated list of integers within a certain range. Anyone know how to do this using XSD? Thanks! ...

A problem with the usage of recursive XML schema types

It is easy to define two elements with the same name like <any> in one XML schema and different permitted subelements. One should just declare two XSD types AnyType1 and AnyType2 as complexTypes which describes permitted subelements. Then one can declare element <any> in one context as <xs:element name="any" type="AnyType1" /> and as <xs...

How to format schema output

I'm creating a schema in code and I want to save it to a file. But in the file the schema is not formatted but is display as one big line. var nsmgr = new XmlNamespaceManager(new NameTable()); nsmgr.AddNamespace("xs", "http://www.w3.org/2001/XMLSchema"); nsmgr.AddNamespace("name", "someNamespace"); var xtw = new XmlTextWriter("somepath...

Is there a way to remove magic numbers from a XML Schema?

I have a WSDL with some types defined. Some elements accept lists of elements and on the service return I also have elements with list of values (or other elements). As a result I have some magic numbers in the XSD (e.g. minOccurs="10", maxOccurs="250" etc). These values 10, 250 etc are repeated throughout the XSD types. Is there a wa...

XML schema specifying transformation

Hi, I have generated an XSD file for an XML file and it's working when I am exporting data from Excel. I would like to know if it's possible to specify the XSL file in the Schema itself, so that when the XML file is created, the XSL is already assigned to it. Is that even possible? Or do I have to do it through Excel VBA code (which I...