[lxml-dev] Resolve RelaxNG document

Lawrence Oluyede l.oluyede at gmail.com
Thu Sep 6 15:41:39 CEST 2007


I'd like to know if there's a practical way to resolve all the
references in a RelaxNG document. Maybe 'expand' is the correct word.

I have a document with some <define> which are mostly custom data
types and some elements using those types. For example:

----
<define name="foo">
  <choice>
    <value>a</value>
    <value>b</value>
  </choice>
</define>

<define name="ABC">
  <element name="abc">
    <ref name="foo">
  </element>
</define>
---

What I'd like is to replace the reference "foo" with the definition of
"foo"  as a whole.

Is there an easy way? I read something about custom resolvers...

I use lxml2.0alpha1

-- 
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair


More information about the lxml-dev mailing list