XSD validations are used to validate the XML file against the stored schema.
0
votes
0answers
4 views
Is it possible to define an attribute of an XML element to be required only if another element's attribute is set to a particular value?
I would like to ask if this is possible and if yes, how to achieve it:
For example if I have an element definition with a complexType in an XML schema definition like this:
<xsd:element ...
0
votes
1answer
19 views
Exclusion of optional attributes makes gml invalid against xsd schema
I have xsd Schema, and gml file according to that schema. When all attributes have values (optional and required) makes gml file valid against schema. But when I intentionally delete few optional ...
0
votes
0answers
17 views
Generating and Validating an XML Document in Multiple Languages
I have written an application that takes a proprietary file format and converts it to XML. I would like to localize that XML file based on culture information by translating element and attribute ...
1
vote
1answer
14 views
Retrieving root element from schema
i have a valid xsd and i want to retrieve the root element without using DOM library.
Is it possible with SAX or by programmatically parsing the file ?
Thanks in advance
0
votes
1answer
18 views
XML file even when it violates XSD
I created the following schema to validate my xml document:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType ...
0
votes
1answer
20 views
XSD for Repeating Elements With different Child
Hi I have an xml that looks like,
<ABC>
<DEF Value="123">
<XYZ>
<RootEle Text="Now" Date="SomeDate"/>
</XYZ>
</DEF>
<DEF AnotherValue="123">
<XYZ>
...
0
votes
0answers
8 views
XSD Schema- Customize Errors Validation
How can customize errors, as per our need,
I mean ,
cvc-maxLength-valid: Value '1111' with length = '4' is not facet-valid with respect to maxLength '1' for type '#AnonType_..'.
cvc-type.3.1.3: The ...
0
votes
0answers
10 views
is it possible to validate json through xsd?
I am currently using a webservice which returns xml and json format. I know that there is an xsd available for xml validation. Is there a way I could validate my json too by converting this to xml ...
0
votes
1answer
11 views
With an xs:any element can I define the attributes of the any elements?
I want to be able to allow the following in my XSD but am stumped. I understand that I could use xs:any in a structure like this but this does not allow me define attributes for the elements that ...
0
votes
0answers
22 views
how to allow empty (Null) value true in Xs:decimal Element in XSD Validation…?
I need apply validation for xs:decimal with allow null values...
I try with following code but it's not work for me
my schema code:
<xs:element name="RangeMin" type="emptyordecimal"/>
...
0
votes
3answers
34 views
XSD XML Analysing the xs:sequence
The xs:sequence says that the elements should be in sequence. Suppose I have the xsd as shown below.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema ...
0
votes
0answers
15 views
xs:assert with count of number of elements
I cannot somehow count the number of sibling elements with name "x" in an extract of this XSD schema?
</xs:all>
<xs:assert test="count(./x) = ...
0
votes
2answers
5 views
XSD 1.1 xs:alternative/xs:assert
Is that possible with xsd 1.1?
I want to switch the attributes depending on the "type" if its "A" or "B".
How can I write an XSD 1.1 syntax for this simple problem?
<?xml version="1.0"?>
...
0
votes
1answer
10 views
It's possible to use multiple value in single enumeration tag?
I'm using XSD validation in WEB API project.
now i'm using following method for check string value.
<xs:simpleType name="CoverageTierPattern">
<xs:restriction base="xs:string">
...
1
vote
2answers
24 views
XSD <xs:all> with multi occurrences unordered
I've the following XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<props>
<id>someId</id>
<file_size>
<size>123</size>
...
1
vote
1answer
44 views
Apache Camel : ValidatingProcessor : XSD validation
I'm trying to create a bundle and run it inside ServiceMix.
I've encoutered a problem, any help is appreciated.
What I'm trying to do:
Produce SOAP messages from a CXF Endpoint and validate them ...
0
votes
1answer
18 views
How to validate xs:unsignedInt with allow Pattern 0,1 and empty value in xsd?
I need to validate the following element:-
<xs:element name="IsBucketRequired" type="xs:unsignedInt"/>
Validation required:-
1. Allow 1,0 [Pattern]
2. Allow Empty value.
I try with ...
0
votes
1answer
24 views
Various default namespaces in nested elements
I'm just curious about default namespaces. I have the follow xml:
<root xmlns="myNamespace">
<someElement xmlns="anotherNamespace">
<data>Info</data>
...
0
votes
1answer
17 views
Unable to get Intellisense work while editing XML files in Visual Studio 2013 Ultimate
I am trying to make Intellisense work for my XML files but unable to do so. In the properties of my XML files I have specified wss.xsd in Scehmas attribute. But still no suggestions for tag or ...
0
votes
1answer
57 views
PayloadValidatingInterceptor from Spring-WS allows elemens not included in XSD
I'm walking through the following tutorial:
http://jeromebulanadi.wordpress.com/2010/02/25/basic-spring-web-service-tutorial-from-contract-to-security/
and I faced a problem. I don't know whether ...
0
votes
1answer
24 views
xsd validation for tag value not null
My Xml is :
<LineService>
<LineSrId>SR_CP_JD_144084-1</LineSrId>
<MSNumber/>
<AccountNo>1320116817829261</AccountNo>
...
1
vote
1answer
19 views
Can I add a attribute and a restriction to a xsd type inline?
I need to imply a restriction and an attribute on a type. I know it can be done this way
<xs:simpleType name="Name">
<xs:restriction base="xs:string">
<xs:minLength ...
0
votes
0answers
24 views
Error adding an attribute and length restriction on a complex type
We have a request XSD that we use in our system and have a Spring Web service that used this request XSD.
Everything compiles and deployed correctly. I can type the WSDL url into IE and view it. I ...
1
vote
1answer
9 views
Why is the targetNamespace ignored if the element is not defined at the global level?
Here is the schema.xsd.
It defines a targetNamespace ns where element 'A' includes element 'B'.
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="ns">
...
0
votes
0answers
31 views
Creating SimpleType with CWsdlGenerator
I am using Yii to create some web services.
One of my operations is named GetExecutionState and ideally I want to return an enumerated string with the values: Activating, Active, Suspending, ...
0
votes
1answer
20 views
Validating XML against a Schema with Namespaces
I have a couple of XML files that I have to validate against a Schema in my program. I have the Schema files stored locally and when I get the XML files, I know which schema to apply. I face a strange ...
0
votes
1answer
13 views
XML Schema - xs:string - multiple occurences
How should be formatted a given XML file to validate against the following schema?
...
<xs:element name="myElement">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" ...
1
vote
1answer
31 views
JAXB problems with schema validation and xsi:type
I'm trying to generate a XSD with JAXB to validate a given XML file and I'm having problems with the xsi:type attribute on some elements. I suspect it's somehow a namespace problem, but I can't find ...
2
votes
1answer
18 views
where to update rules, constrains and elements of xml schema
I am trying to build my own xml schema.
For example, I have this element
<xs:element name="employee">
<xs:complexType>
<xs:sequence>
<xs:element name="firstname" ...
1
vote
1answer
7 views
XSD restriction with mathematical constants
My question is quite straight-forward. With XSD, is it possible to restrict a value with mathematical constants like PI. For example, when you want a radian value between 0 and PI.
If not, is there ...
0
votes
2answers
20 views
Struggling with XSD schema
I have the following XML documents, kinda simple:
<configuration>
<group name="database">
<server name="machine01" user="root" password="foob4r" sudo="true" hdd="300" ...
0
votes
1answer
31 views
Native schema(nxsd): FS and GS delimited file
I need to create native schema NXSD for FS(File Separator) and GS(Group Separator) delimited file. Could anyone help me here please? I am not able to create one. Help will be highly appreciated. Here ...
1
vote
1answer
27 views
Complex restricting logic in XSD file
I'm triyng to create a schema definition and I have to describe the following scenario:
...
<DeviceParamUpdate>
<Update>
<ProcessorName>NPT Length</ProcessorName>
...
0
votes
0answers
58 views
illegalAnnotationException happening in webservice deployment at jboss EAP 6.1
we are having web service which is correctly working on jboss 4.2.3 , jboss 5.1.0 and jboss 6.1.0 Final As well. Recently we are planning for the migration of web service to EAP 6.1 Final. During that ...
0
votes
0answers
7 views
Quartz server's problems locked my deploy last night
Last night I was trying to deploy my web application on Tomcat7, but it repeatedly failed because quartz server was unreachable.
Context was not able to load because it was not able to download ...
1
vote
1answer
38 views
Check the values of Attribute of two different XML files using XSD
I have two xml files as below.
I want to check the attribute Id should have same value in both xml files.
Can I do it suing XSD ?
<!-- Library.xml -->
<?xml version="1.0" ...
1
vote
0answers
32 views
Unable to generate classes using maven from XSD
Error whiel trying to generate class files from xsd using maven
I have the below xsd file:-
<xs:schema attributeFormDefault="unqualified"
elementFormDefault="qualified" ...
1
vote
1answer
39 views
XML Schema validation containing ASSERT Tag
I am trying to validate a XML instance with a XML Schema which contains an assert tag in it. The validator throws an exception containing the message:
The content of '#AnonType_message' is ...
1
vote
2answers
59 views
XML validation (different child tags) based on attribute value
I am writing an dashboard designer that will create widgets based on xml values.
like
<dashboard>
<widget type="chart">
</widget>
</dashboard>
I want to change ...
1
vote
2answers
49 views
work around for validating XML child elements
Basically my question is whether or not there is way to validate a non-root element according to a given XSD schema.
I am currently working on some legacy code where we have some C++ classes that ...
0
votes
1answer
22 views
Disallow <!ELEMENT> and other declarations in schemas (DTD, XSD)?
Is there a way to use a schema (preferably XSD) to let validation of an XML document fail, if there are <!ELEMENT ...> and similar declarations contained?
Or would the XML parser still be ...
1
vote
1answer
22 views
“Type [namespace:type] is not declared” yet is imported correctly, I think
Im using Visual Studio 2013 to develop an XSD Schema that imports another schema for use of its "Neck" type. For some reason Visual Studio doesnt like my use of type="wn:Neck", resulting in the error ...
2
votes
3answers
96 views
C# xml validation
I defined a xsd:
Very similar to HTML table. rows has columns and columns has elements.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:attributeGroup name="basics">
...
0
votes
0answers
90 views
Exception Exception: s4s-elt-invalid-content. Element 'assert' is invalid, misplaced, or occurs too often
Currently i am using Altova IDE for desgning XSD now in Altove XSD looks ok and validate the XMl, but whenever i am trying to Validating XML against same XSD in Java code it will give me Exception,
I ...
1
vote
1answer
31 views
XML to XSD,no name space bound error
My xml is this,and i have written xsd also.The correct way of namespace? its giving error.
**prefix not bound**It has something to take with the name space
<?xml version="1.0" encoding="UTF-8" ...
1
vote
1answer
54 views
Dynamic attribute in element XSD Schema
It is possible to add dynamic attribute in <element>
for example I have a <A> element it have a fixed attribute name mode
<A mode="ENABLE"> <!-- ENABLE or DISABLE-->
if mode ...
1
vote
1answer
24 views
writing XSD from XML
I am writing the XSD for my XML.I am strucked at a point.Can you please help me out.
PLEASE mderators DELETE THIS
<xsd:element name="AAA">
<xsd:complexType>
AND
<xsd:element ...
1
vote
1answer
40 views
Restricting number of element count in <all> XSD Schema
What I'm trying to do is, declare an parent element called "data", which are having 10 sub element of these one element are conditional.
My XSD is:
<?xml version="1.0" encoding="UTF-8"?>
...
1
vote
1answer
61 views
XSD Schema Error : the content model of complex type definition ' anonymous ' is ambiguous while multipal choice
XSD Code: getting error- the content model of complex type definition ' anonymous ' is ambiguous
<xs:element name="data">
<xs:complexType>
<xs:choice>
...
0
votes
1answer
41 views
Choice element in XML Schema with any order, any number and “one element restriction”?
What I'm trying to do is, declare an parent element called "data", which are having 6 sub element of these one element are conditional that means one element is appear only and only one time and other ...