You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Hal Hildebrand <ha...@oracle.com> on 2006/01/18 02:18:37 UTC

Digester XSD processing query

I would like to use the digester to process XML defined by schemas.  The only problem is that the XML in question has elements that are defined in another namespace, which is known only at the time of processing.

Here's an example of the sequences I need to process

<complexType name="Component">
    <sequence> 
        <element minOccurs="0" maxOccurs="1" name="properties" 
		     type="foo:PropertyValues"/> 
        <any namespace="##other" processContents="lax" 
             minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="name" type="NCName" use="required"/>
    <anyAttribute namespace="##any" processContents="lax"/>
</complexType>

<complexType name="PropertyValues">
    <sequence>
        <any namespace="##other" processContents="lax" minOccurs="0" 
             maxOccurs="unbounded"/>
    </sequence>
    <anyAttribute namespace="##any" processContents="lax"/>
</complexType>

Here's a sample XML snippet: 
        <properties>
            <v:currency>EURO</v:currency>
        </properties>

Anyone have any ideas as to how I would go about setting up the rules to process this mess?  Any help would be appreciated.  Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


RE: Digester XSD processing query

Posted by Hal Hildebrand <ha...@oracle.com>.
Yes, most of the input XML is known.  It is designed with integration points in a few places.  I'll check out the NodeCreateRule - it sounds like this precisely what I was looking for.

Thanks.

-----Original Message-----
From: Simon Kitching [mailto:skitching@apache.org]   

Do you mean that the structure of *most* of the input xml is known, and
that just a few places it can contain any arbitrary xml? If so, you
could use NodeCreateRule to store those unknown bits as DOM nodes.

Or do you mean that the whole structure is really unknown until runtime?
If so, what are you planning to do with this completely unknown data?

Regards,

Simon 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Digester XSD processing query

Posted by Simon Kitching <sk...@apache.org>.
On Tue, 2006-01-17 at 17:18 -0800, Hal Hildebrand wrote:
> I would like to use the digester to process XML defined by schemas.  The only problem
> is that the XML in question has elements that are defined in another namespace,
> which is known only at the time of processing.

Do you mean that the structure of *most* of the input xml is known, and
that just a few places it can contain any arbitrary xml? If so, you
could use NodeCreateRule to store those unknown bits as DOM nodes.

Or do you mean that the whole structure is really unknown until runtime?
If so, what are you planning to do with this completely unknown data?

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org