Re: [xml] schema parsing
- From: Daniel Veillard <veillard redhat com>
- To: Chris sun <lei_sun comcast net>
- Cc: xml gnome org
- Subject: Re: [xml] schema parsing
- Date: Tue, 6 Apr 2004 14:31:15 -0400
On Tue, Apr 06, 2004 at 01:42:34PM -0400, Chris sun wrote:
Hi
suppose I have a shema file that include following statement.
<simpleType name="PM_TYPE">
<restriction base="string">
<enumeration value="PM_ICP"/>
<enumeration value="PM_4_20MA"/>
<enumeration value="PM_LM135"/>
</restriction>
</simpleType>
Is there any way that I could parse this schema and obtain a set
of string contain those 3 text name ? such that I can force users to
choose from them when they write their XML file? same thing for the
"choice" statement in the schema file ? right now I can only use schema
to validate the XML file .
Hum, no. At the moment, the schemas APIs are minimal, this makes sense
because the implementation is not considered complete.
I didn't try to implement Schemas or Type content lookup, it may
not be trivial to design such API, and honnestly I didn't studied
any of the APIs provided by other toolkits. It sounds unlikely I will
get the time needed for this, doing this isn't a simple patch, such
API need some thought on design, so it's not like getting a simple
function implemented and applying a patch. However you're not the only
one interested and if there is enough people looking at this then
maybe this can be designed and build.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]