You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@abdera.apache.org by Brian Moseley <bc...@osafoundation.org> on 2007/08/07 19:46:07 UTC

xml restricted characters

whose responsibility is it to account for entry content that contains
characters restricted in xml?

i'm generating an entry with content of type "text/json". the content
contains a control character. the feed is serialized and written to
the output stream with no problems.

my expectation is that an exception would be thrown by the axiom xml
serializer when it encounters a restricted character. should i instead
be detecting them in my content before setting it on the entry? is
there a utility for filtering them out? xml doesn't define any
escaping rules for restricted characters does it?

Re: xml restricted characters

Posted by James M Snell <ja...@gmail.com>.
FWIW, I do not believe the reader has any direct dependencies on any
other part of abdera.  It should be possible to pull it out and use it
directly without having to upgrade everything else...

... that said, there are *lots* of other reasons to upgrade to the trunk :-)

- James

Brian Moseley wrote:
> On 8/7/07, James M Snell <ja...@gmail.com> wrote:
>> The trunk now includes support for filtering out restricted characters
>> when parsing.  When enabled in ParserOptions, those characters are
>> ignored completely and never appear within the parsed document.  If you
>> parse a doc with restricted chars then reserialize, they should not be
>> present at all.
> 
> yea, i saw that. very cool.
> 
>> There currently is no mechanism for filtering out
>> restricted chars on serialization due to a limitation in the Axiom
>> serialization code.  I'm looking to resolve that later.  In the
>> meantime, there is a reader implementation that can do the filtering for
>> you if you'd like. Look in org.apache.abdera.util.* for the reader.
> 
> will be some time before i'm able to update cosmo to the abdera trunk,
> but i'll check out that reader when i get a chance. thanks!
> 

Re: xml restricted characters

Posted by Brian Moseley <bc...@osafoundation.org>.
On 8/7/07, James M Snell <ja...@gmail.com> wrote:
> The trunk now includes support for filtering out restricted characters
> when parsing.  When enabled in ParserOptions, those characters are
> ignored completely and never appear within the parsed document.  If you
> parse a doc with restricted chars then reserialize, they should not be
> present at all.

yea, i saw that. very cool.

> There currently is no mechanism for filtering out
> restricted chars on serialization due to a limitation in the Axiom
> serialization code.  I'm looking to resolve that later.  In the
> meantime, there is a reader implementation that can do the filtering for
> you if you'd like. Look in org.apache.abdera.util.* for the reader.

will be some time before i'm able to update cosmo to the abdera trunk,
but i'll check out that reader when i get a chance. thanks!

Re: xml restricted characters

Posted by James M Snell <ja...@gmail.com>.
The trunk now includes support for filtering out restricted characters
when parsing.  When enabled in ParserOptions, those characters are
ignored completely and never appear within the parsed document.  If you
parse a doc with restricted chars then reserialize, they should not be
present at all.  There currently is no mechanism for filtering out
restricted chars on serialization due to a limitation in the Axiom
serialization code.  I'm looking to resolve that later.  In the
meantime, there is a reader implementation that can do the filtering for
you if you'd like. Look in org.apache.abdera.util.* for the reader.

- James

Brian Moseley wrote:
> whose responsibility is it to account for entry content that contains
> characters restricted in xml?
> 
> i'm generating an entry with content of type "text/json". the content
> contains a control character. the feed is serialized and written to
> the output stream with no problems.
> 
> my expectation is that an exception would be thrown by the axiom xml
> serializer when it encounters a restricted character. should i instead
> be detecting them in my content before setting it on the entry? is
> there a utility for filtering them out? xml doesn't define any
> escaping rules for restricted characters does it?
>