Yes, that would be be basic idea. I unfortunately don't have time to work on this right now, so I'll refrain from too much peanut-gallery advice, but my initial feeling is that basing it on the schema would allow us to be a bit more intelligent about pretty-printing.
-- Mark On Wed, 2005-07-13 at 11:22 -0700, Radu Preotiuc-Pietro wrote: > I see, so like if an element has element-only content, then we would insert > spaces, but if it has mixed- or text-only content (simple content) the we > would not touch it. Would this be based on the Schema or on the actual > content of the element, you think? The reason I am asking is because you can > create and manipulate invalid documents via XMLBeans. We would also need to > find a way to cleanly expose this option without impacting the current > functionality. > Gretchen, it would be useful to have a JIRA improvement request for this, > with the priority you think it has, then of course, we appreciate all the > help we can get on it. > > Thanks, > Radu > > -----Original Message----- > From: Mark Lewis [mailto:[EMAIL PROTECTED] > Sent: Monday, July 11, 2005 4:55 PM > To: [email protected] > Subject: RE: Whitespace is not preserved > > > Hmmm, I wonder if it would be possible to alter the pretty printer to > work even in this case. > > What if we check whether an element has leading/trailing whitespace that > needs to be preserved, and selectively disable pretty-printing for that > element only? Whitespace between tags wouldn't need to be preserved > (unless it was defined in the schema, but most aren't written that way), > so the overall document could still look pretty good. > > -- Mark Lewis > > > > On Mon, 2005-07-11 at 16:23 -0700, Radu Preotiuc-Pietro wrote: > > Well, to be honest, the meaning of pretty print is that you give up > > space preservation in order to get a document that's easier to read. > > If you care about spaces being preserved, you should _not_ use pretty > > print. They're exclusive and I am not sure how would they work > > together. > > > > However, if you access the document using, say, XmlCursor, then all > > the original spaces in the infoset will be there, regardless of the > > Pretty Print value. > > > > Radu > > > > --------------------------------------------------------------------- > 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

