xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Kolpackov <bo...@codesynthesis.com>
Subject Re: Validating XML document without namespace
Date Tue, 16 Jan 2007 08:19:44 GMT
Hi Edward,

Edward Rozendal <rozendal@hitt.nl> writes:

> I have an application with Xerces 2.4.0 that parses XML using SAX2. My
> client has supplied me with XML schema's that include namespaces. When I
> create an XML file with XMLSpy it will look like:
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) -->
> <tns:keepalive xmlns:tns="http://www.example.eu/common/name/v1-0"/>
> The application does accept and validate this XML file. However I have been
> asked if it is also possible to accept and validate XML files that look like
> this:
> <keepalive/>

I am pretty sure this is not possible. Element namespace is part of the
element id (just like name). The best you can do is this:

<keepalive xmlns="http://www.example.eu/common/name/v1-0"/>


Boris Kolpackov
Code Synthesis Tools CC
Open-Source, Cross-Platform C++ XML Data Binding

View raw message