I would say if that data is well-formed XML then your original approach
would work, with the possible addition of "mixed=true" if your client's
content can have text at top-level.

Then the "XML generator" that you are talking about should get a clue
probably based on the name of the type/element that it writes out
(possibly the contents of that type but that may have side-effects that
you don't expect in case you have other types with similar content) that
it is the "black box" content and then write it out. It seems to me that
the generator is likely the problem in this case.

Radu

-----Original Message-----
From: Jim McMaster [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 05, 2006 3:20 PM
To: user@xmlbeans.apache.org
Subject: RE: Problem with element defined with xs:any


On Thursday, January 05, 2006 3:55 PM, Radu Preotiuc-Pietro
<mailto:[EMAIL PROTECTED]> wrote:

> Hm, actually I believe ELEMENT_CONTENT is what it should be. The 
> <xs:any> tells you that you can have any number of arbitrarily named 
> elements, but you can't have text as a direct child of "blackBox".
> 
> And there is a difference between having the XML content as String 
> (like in a CDATA section) and having it as XML, just from an XML 
> processing point of view, regardless of XMLSchema.
> 
> So you should decide which one makes more sense for you: treating it 
> as String or treating it as unknown element content (it is also
> possible to
> combine <xs:any> with "mixed", though in your case it sounds like this
> is not what you want), and then make sure the XML documents match this
> decision. 
> 
Okay, maybe I had the wrong idea.  What I need is an element that can
contain any type of content at all.  It might or might not be valid XML.
We get arbitrary data from our customer, and need to spit it back out
exactly as we received it.  We want to validate the rest of the output
against our schema before we transmit it, without the contents of the
blackBox affecting the validity of the document.

Should I define this as CDATA?  Or is xs:anyType a possibility?

-- 
Jim McMaster
mailto:[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to