Questions tagged [xsd]
XSD generally refers to a document written in the W3C XML Schema format, containing a description of a particular type of XML document.
13,856
questions
0
votes
0
answers
7
views
XSD validation optional string and only 4 numbers
I need a validation in this XSD.
FD is optional.
If you fill in FD it should have only 4 numbers (not 2 numbers or 5 numbers)
<xs:element name="FD" minOccurs="0&...
0
votes
0
answers
24
views
No URI javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"processRequest"). Expected elements are (none)
I'm getting the following exception which I stayed 3 days debugging it with no solution
I generate Java classes from XSD using JAXB
Here is XSD
<xs:import namespace="http://www.tolba-...
0
votes
1
answer
15
views
XSLT on XSD - namespace change
I have a xsd which is transformed with xslt. Based on the original schema, I use the xslt to create a somewhat smaller version to be used by third parties. The xslt works fine for the payload, but I ...
0
votes
1
answer
18
views
XSD Make a tag required if value
I want to create an XSD that will require tag2 when the val of tag1 is "x", which is basically make the tag "required" in specific value case. is that possible?
<T>
&...
0
votes
1
answer
46
views
Understading and creating XML inner chained sequences
I am tasked to recreate an inner chained sequence using the XSLT starter code that has been provided to me. What I am confused is that I am not sure how to set up the XPaths in the XSLT file.
...
0
votes
1
answer
16
views
cvc-complex-type.3.2.2: Attribute setHeader is not allowed to appear in element headerName (Camel)
I have seen a bunch of explaination, even on this site, about the error above... but no one was sufficiently clear about this two points:
Why appears this error?
How can I correct it exactly? What ...
0
votes
1
answer
14
views
Validate XML with XSD In PHP
I want to validate multiple xml files with different element names , i use a XSD file but is static , there is any way to make it danymic ?
For example i want in <xs:element name="root"&...
0
votes
1
answer
14
views
Validating XML electronic invoice against XSD on C#
I'm creating an xml for the italian electronic invoice, this is the Model:
public class EInvoice
{
public class Fattura
{
[Serializable]
[XmlType(Namespace =...
0
votes
1
answer
19
views
How to validate XML with multiple XSD stored in Odoo modules
I need to validate an xml that I generate with two XSD files provided. I am struggling because one of the XSD files references the other one and it looks that I am getting errors because of that.
The ...
0
votes
0
answers
26
views
Why does the namespace of SOAP Envelope have to use http not https?
I have a question about the soap message to Web Services. My company used a static analysis tool, then the report have a CVE about using http in the soap message. How does explain the envelope of soap ...
0
votes
0
answers
5
views
cxf-xjc-plugin: how to add @XMLRoot Annotation to complex type?
I have a XSD Schema and there is an "any" element
<xs:any minOccurs="0"
maxOccurs="unbounded"
namespace="http://the-namespace....
2
votes
1
answer
24
views
XML and XSD mistake
i need help to solve my error with this code of XML and XSD, please if u can check it and tell me a solution of why it doesn't works am gona be your slave
this is my XSD code:
<?xml version="1....
-1
votes
1
answer
47
views
Add namespace to a specific node of XML using XSLT in six field
You can help me please, I need an XSLT to add the namespaces to the tags.
The namespaces to add is xmlns:ns1="http://www.servipag.cl/ESB/GenericService/Common" in six fields.
Current XML
...
-1
votes
0
answers
14
views
create shema databse using XSD in mysql
I have a shema database in file type XSD this file contains descriptions of all tables.
My question is how I can use this file to create a database in MySQL. if you have suggestions for creating a ...
1
vote
0
answers
18
views
Choice between two elements with same name
I am struggling with a choice between an element that is mixed and one that is not.
<xs:group name="code">
<xs:choice>
<xs:element name="code"...
1
vote
1
answer
72
views
Visual studio 2022 perform search into .xsd designer
I have a big project with an .xsd file that contains the dataset of all the tables of the database.
I use the .xsd designer integrated with visual studio to add query to table adapter and other stuff.
...
0
votes
1
answer
25
views
XSD assuring that each enumeration value can only occur once as attribute
Let's say I have a schema to define a list of articles. Each of these articles has a list of long names, one for each known language. The language is an attribute at the level of an individual long ...
-1
votes
0
answers
19
views
Get XSD schema for ASP.NET Web API
I have created simple REST web service with C# by selecting following in create wizard:
ASP.NET Web Application
Web API
Got default controller:
public class ValuesController : ApiController
{
...
0
votes
2
answers
31
views
validating xml against xsd ignores extra elements
I am trying to validate a XML file against a XSD file but extra elements I add to the XML are not recognized as wrong.
xsd:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://...
0
votes
0
answers
40
views
XSL logic to get the text immediate to closing child tag
Please help me to write XSL rule for the below requirement
Requirement:
In an XML file inside the main tag if "IsValid : true" then check for the link's href attribute has either any one of ...
0
votes
0
answers
14
views
In a DTD, can an attribute be in only one of two declared elements?
I have to write a DTD valid for this XML document:
<orders>
<order>
<_id ord_date="2020-03-01" status="A">1.0</_id>
<cust_id>...
0
votes
0
answers
6
views
Are there any XSD files to validate XML for the https://www.w3.org/TR/widgets/ namespace?
In the intelliJ suite, xsd validation is performed automatically and you get an error if a given schema is not found. I tried to find an xsd file for the w3c widgets namespace but i couldn't.
If there ...
0
votes
0
answers
8
views
How can we allow any parent to a specific tag xsd rule
I need to allow any parent tag over <a> tag except <root> tag which means tag have any parent element except root.
Example:
<root>
<p><a href=""></a>&...
0
votes
1
answer
16
views
Pojo Conversion with HibernateMapping & Jaxb
I have two Pojo classes, one for hibernate mapping and one for jaxb.
So I get a List<CarA> using Criteria.list() and I would like to transform it into a List<CarB> in order to send it back ...
0
votes
1
answer
22
views
Spring boot Web services - WSDL generation
I have followed this tutorial: https://spring.io/guides/gs/producing-web-service/ by Spring and works fine, however, I do not get part of it.
The demo application takes an XSD file and generates a ...
0
votes
0
answers
12
views
key reference in xml schema with data manipulation
I got a xml-file like following
<TOP>
<DataNode>
<AdditionalInfo additionalInfoReference="#id600" />
<AdditionalInfo additionalInfoReference="#...
0
votes
0
answers
10
views
Gsoap to generate xsi:type without -t option (soapcpp2 -t)
I have a wsdl ans xsd file and want to generate a xml with xsi:type only for particular tags.
I used the soapcpp2 -t but it creates xsi:type for all types.
i.e for namespace(xsi:type="ns:anything&...
0
votes
1
answer
25
views
How to configure shared javascript runtime using Visual Studio?
I am using Visual Studio for creating excel add-in. I also have some server-side code because of which i am using Visual Studio. I wanted to configure shared javascript runtime so that i can open the ...
4
votes
1
answer
68
views
How do I configure beans for a static wsdl, which is importing a root xsd of a hierarchical structure?
I am implementing soap web services in a Spring environment. The xsd and wsdl definitions come from an external company, and I've implemented the endpoints already.
However, when exposing trying the ...
0
votes
0
answers
23
views
maxOccurs restriction based on node attribute in XML
I have following XSD:
<xs:element name="constGroup">
<xs:complexType>
<xs:sequence>
<xs:element name="const" maxOccurs="unbounded&...
1
vote
1
answer
28
views
SOAP header without namespace
I want to create a SOAP header. That should contain an Element Token without namespace. If I don't give namespace I'm getting the "Header element must be namespace-qualified" error.
Below ...
1
vote
1
answer
87
views
Validate XML against schema with delphi
Hell everyone,
I'm trying to validate XML against schema using the delphi procedure, but I'm getting sort of errors like: the node is not correct neither incorrect - cannot find DTD definition.
I'm ...
0
votes
1
answer
21
views
Validate FIXML against Schema (XSD)
I'm trying to validate some FIXML messages that I received from a business partner but I couldn't. I think should be a namespace problem because the parser don't identify the root tag (FIXML). Any ...
1
vote
0
answers
21
views
Hide autogenerated content of XML annotations in Springfox Api-docs
I am writing a Gradle project with Springfox-swagger-ui 3.0.0 to present nice swagger UI with Api documentation.
compileOnly "io.springfox:springfox-swagger-ui:3.0.0"
One of api endpoints ...
1
vote
1
answer
36
views
Get XSD from RESTful Web API
I have created simple RESTful Web API with automatic documentation from Swagger on Azure by using C# :
namespace WebAPIDemo.Controllers
{
public class ValuesController : ApiController
{
...
1
vote
1
answer
41
views
linq to xsd (is it dead? has something replaced it?)
I sometimes use type providers in F# to create typesafe 'queries' on xml data.
I'm looking for something that does something similar that can be used from C# (unfortunately F# has some magic that ...
-1
votes
1
answer
37
views
XSL - Unable to get all child nodes
I am trying to generate a custom schema (XSD file) using a XSL file but the XSL is not picking up all the data elements from the XML input which I am providing. Please see below:
XML input:
<?xml ...
0
votes
0
answers
24
views
Unable to marshal JAXB object due to SAXParseException (Cannot find the declaration of element error)
I am trying to validate an XML. The XML has the root element as "Notifications" and list of "Customers".
I want to validate each customer against the XSD and in case the validation ...
0
votes
1
answer
33
views
JAXB require boolean
I am trying to generate a XSD file with a boolean element that is always required.
When I use the XSD file to generate the java classes (with JAXB) the field is not required.
I have attempted the ...
0
votes
0
answers
16
views
XSD schema multiple choice value
In my xsd schema I have enumeration for status field and if I have value like "New" or "Cancelled" it's correct.
But sometimes I wan't to mix this values and I have status like ...
0
votes
2
answers
29
views
Is it possible to create XSD unique constraint based combination of element and node with multiple elements?
Having the following xml code
<repository>
<software id="1">
<versions>
<version>version1</version>
<version>version2&...
0
votes
0
answers
43
views
Invalid XML '<Contacts>'. Error: unexpected element (uri:"", local:"Contacts"). Expected elements are (none)
I am new to the relationships and workings behind XMLs, XSDs, XSLs and the marshaling and unmarshaling processes that come with them. I am working on a web app where the user can upload an XML file in ...
-1
votes
0
answers
18
views
Which data type should be used for -5.89757073860143E-05 to convert it to real value in XSD file?
I have tried double, decimal, string, float, BigDecimal to convert -5.89757073860143E-05 to real value but it won't work. double data type is work for E with some positive value to convert to real ...
0
votes
0
answers
19
views
Generate a test XML from XSD programmatically using visual studio with user interface to select the files
I need to generate xml files by using xsd and the inputs must be coming from excel sheets.
Someone help me with this.
0
votes
1
answer
19
views
How to use an enumeration and pattern for phone in xsd?
The problem is requesting the following. That the phone should have the attribute type with 3 enumerated values of home, cell, and work. AND the phone should also be restricted to a phone format of (##...
0
votes
0
answers
19
views
How to format currency inside a xs:decimal format in xsd
Taking an XML class and I'm struggling to format the currency code and the phone numbers in the way the book wants. When I try to validate to make sure it works, it either comes up as invalid or doesn'...
0
votes
0
answers
15
views
XSD to allow ul and ol tags inside li tag xsd
I have written a rule for li tag as below and i need to modify this to allow ul or ol tags inside li tag and i don't want to make it mandatory that it should contain ol or ul inside li tag. It should ...
-2
votes
0
answers
20
views
How to create single xsd (Schema file) from multiple xml files?
enter image description hereHere the two or more xml files are almost different with different features.
0
votes
1
answer
25
views
XML Choice of elements, but of same type when maxOccurs is unbounded
I am trying to define an element in an XML file using an XSD schema with a choice, which is not that hard:
<xs:complexType abstract="true"
name="ESAPIObject&...
0
votes
0
answers
31
views
Use of the schema-element node test in XSD 1.1's assert test
I am trying to design a XML schema where a certain element may alternatively hold either a single element belonging to a substitution group or a collection of certain elements which I want to be free-...