-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, May 24, 2005 4:38 PM, Radu Preotiuc-Pietro <mailto:[EMAIL PROTECTED]> wrote:
> This is one nitpicky customer! What prefix exactly does he > expect? It is for this kind of cases that we introduced > XmlOptions.setSaveSuggestedPrefixes(). > As far as generating XML documents based on an algorithm > embedded in the <appinfo> elements, this is very interesting, > never heard of that before, do you really get to generate > documents that are GB in size in practical situations? > They want the prefix "ontology", which is the one defined in the schema. I know about XmlOptions.setSaveSuggestedPrefixes, but (1) I would rather just get the prefix from the schema and (2) I am not sure how it works if I am not using XmlBeans to write the instance document. Since there is a Qname.prefix field, I was hoping the XmlBeans compiler would put the prefix there, but it does not seem to do so. I had not heard of using appinfo this way either, but I have gotten it to work. Basically, the appinfos contain XML documents that conform to another schema that defines a small interpreted language for calling java methods and managing variables. Once I build a tree of nodes that implement the interpreter, I evaluate them, writing out instance documents that (hopefully) conform to the schema. Except for the namespace problem, it works well. And yes, I have used this approach to generate a 1.2 GB XML document. This is a large batch, but not a theoretical limit. I use a StAX XmlStreamWriter to write the actual XML to avoid keeping the whole thing in memory. - -- Jim McMaster mailto:[EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 iQA/AwUBQpOwM2aP5l7/atSJEQIjHwCg7wlJHQ08Vp/U7SQYRDw4eUuhsrkAoPkH 0PNf4JyFTuNHWJpW8aQEfjKd =5Ofz -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

