Re: [xml] schema parsing

On Tue, Apr 06, 2004 at 01:42:34PM -0400, Chris sun wrote:
  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"/>

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 Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]