Hello,
I'm looking for a way of validating/parsing the xsd file (schema), i
only been able of validating the xml file with the corresponding
schema, but what i want is only validate the xsd file, to check if the
schema is valid.
I'm using Xerces-C++ and the only thing that i found is a way of
parsing the xml file with the xml schema like this:
SAX2XMLReader* parser = XMLReaderFactor y::createXMLRea der();
...
parser->loadGrammar(xs dFile.c_str(), Grammar::Schema GrammarType,
true);
parser->setFeature(XML Uni::fgXercesUs eCachedGrammarI nParse, true);
parser->parse(xmlFile. c_str());
But when i try this with only the xsd file
(ex:parser->parse(xsdFile. c_str());) the parser gives me these errors:
ERR: Unknown element 'xs:element'
ERR: Attribute 'ref' is not declared for element 'xs:element'
ERR: Unknown element 'xs:schema'
ERR: Attribute '{http://www.w3.org/2000/xmlns/}xs' is not declared for
element 'xs:schema'
ERR: Unknown element 'xs:element'
ERR: Attribute 'name' is not declared
My question is:
is there any way in Xerces-C++ to validate one xsd file only, not the
xml file against it's schema?
Thanks
Nuno 1 4749
Hi Nuno!
AFAIK Xerces can't do this for you. Using Saxon-SA you can validate the
schema itself.
Regards
spiff http://www.spycomponents.com
ValidatorBuddy - Use Xerces, Saxon or MSXML in XMLSpy
Nuno schrieb:
Hello,
I'm looking for a way of validating/parsing the xsd file (schema), i
only been able of validating the xml file with the corresponding
schema, but what i want is only validate the xsd file, to check if the
schema is valid.
I'm using Xerces-C++ and the only thing that i found is a way of
parsing the xml file with the xml schema like this:
SAX2XMLReader* parser = XMLReaderFactor y::createXMLRea der();
...
parser->loadGrammar(xs dFile.c_str(), Grammar::Schema GrammarType,
true);
parser->setFeature(XML Uni::fgXercesUs eCachedGrammarI nParse, true);
parser->parse(xmlFile. c_str());
But when i try this with only the xsd file
(ex:parser->parse(xsdFile. c_str());) the parser gives me these errors:
ERR: Unknown element 'xs:element'
ERR: Attribute 'ref' is not declared for element 'xs:element'
ERR: Unknown element 'xs:schema'
ERR: Attribute '{http://www.w3.org/2000/xmlns/}xs' is not declared for
element 'xs:schema'
ERR: Unknown element 'xs:element'
ERR: Attribute 'name' is not declared
My question is:
is there any way in Xerces-C++ to validate one xsd file only, not the
xml file against it's schema?
Thanks
Nuno
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bugbear |
last post by:
Subject pretty much says it all. I'd like to
parse XML (duh!) using Xerces (because its fast,
and reliable, and comprehensive, and supports lots
of features).
I'd like to conform to standards as much as possible,
so I'd like to call Xerces under the JAXP API.
I'd like to validate the XML against a DTD, so that
errors are flagged up to the user, and I can transcribe
|
by: Bekkali Hicham |
last post by:
hi, i have downloaded the latest version 2.4 of Xerces, and unziped it, i
end up with a diectory hierarchy like this
c:\xerces-2_4_0\XercesImpl.jar
c:\xerces-2_4_0\XercesSamples.jar
c:\xerces-2_4_0\xml-apis.jar
c:\xerces-2_4_0\xmlParserAPIS.jar
c:\xerces-2_4_0\data
c:\xerces-2_4_0\docs
c:\xerces-2_4_0\samples
there is no bin directory, my question is :
|
by: Stu |
last post by:
I am trying to build the xerces shared library with 2.3.0 version of
their source code on an AIX 5.1 32 bit machine with the following
version of the g++ compiler
/usr/local/bin/g++ -v
Reading specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.1/specs
Configured with: ../gcc-3.3.1/configure --disable-nls
Thread model: aix
gcc version 3.3.1
|
by: Waseem |
last post by:
Hi
I have looked and tried everything and i still cant sort this out i
have no idea why this wont work
I am using Xerces Perl on Windows and Debian to try this and it wont
work on both of them.
Basically i am tryin to do simple tree transversale and get the node
values out
|
by: Jim Phelps |
last post by:
After having memory leak issues with Xerces-c 2.3.0 for Solaris 2.7
for CC 6.2 I have decided to update to at least 2.4. I have
downloaded the binary tarball and have installed it on my development
server, which runs Solaris 2.8. I do use CC 6.2 for my compiler. I
have reset all the environment variables in Korn shell that point to
the Xerces distribution.
When I try to compile the same piece of code that compiles fine under
Xerces...
| |
by: Dale Gerdemann |
last post by:
I've been trying to use DOM level 3 with xerces-2_6_2. There's a
sample called samples/DOM3.java, but I've had trouble with
compilation. I've downloaded Xerces-J-bin.2.6.2 and
beta2-dom3-Xerces-J-bin.2.6 and added the following paths to my CLASSPATH:
..../xerces-2_6_2/xercesImpl.jar:
..../xerces-2_6_2/dom3-xercesImpl.jar:
..../xerces-2_6_2/dom3-xml-apis.jar:
..../xerces-2_6_2/xmlParserAPIs.jar:
..../xerces-2_6_2/xercesSamples.jar:
|
by: jacksu |
last post by:
I have a simple program to run xpath with xerces 1_2_7
XPathFactory factory = XPathFactory.newInstance();
XPath xPath = factory.newXPath();
XPathExpression xp = xPath.compile(strXpr);
System.out.println(xp.evaluate(new InputSource(new
FileInputStream("a.xml"))));
|
by: Matt |
last post by:
Hello,
Summary:
Where can one download a Xerces-C (XML pardser) dynamic library file
(.DLL file) for Windows (Win98/WinNT/Win2k/WinXP/Win2003, including
server flavors; don't need to support pre-98) without having to build
the library from source?
We posed this question to the Xerces-users email list, but have yet to
|
by: Vlad Zorinov |
last post by:
I'm getting the following error after a couple of months of XML processing, using Xerces 2.0.0 in an apache tomcat. Does anyone have any ideas what this problem may be or what I should do to solve it?
cheers,
Vlad
The exception is...
tv.ditg.sdl.ParsingException:
tv.ditg.sdl.ParsingException:
|
by: Raphael Tagliani |
last post by:
(english version below)
Bonjour!
Je travaille sur un gros projet java, qui parse beaucoup de fichiers xml
au lancement d'un serveur.
Nous avons un problème de concurrence qu lancement.
En fait, il s'agit d'une erreur Xerces FWK005, et nous sommes incapables
de trouver d'où elle provient dans le code. Nous avons déjà essayé de
rendre toutes les méthodes qui appellent Xerces synchronized, mais celà
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |