cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: REPOST: HTML Tags from a database field
Date Sun, 13 Jan 2008 00:06:45 GMT
Derek Hohls pisze:
> Tobia
> Whew!  Sounds like a lot of work for what I thought would be a
> simple config issue.   Any chance you could make the stylesheets
> available - maybe upload them to the wiki?

I just looked at the code of SQLTransformer and found this, which is rather interesting to
        protected void serializeData(String value)
        throws SQLException, SAXException {
            if (value != null) {
                value = value.trim();
                // Could this be XML ?
                if (value.length() > 0 && value.charAt(0) == '<') {
                    try {
                    } catch (Exception ignored) {
                        // FIXME: bad coding "catch(Exception)"
                        // If an exception occured the data was not (valid) xml
                } else {

As you see, SQLTransformer checks for possibility that it got an XML as value. The check is
silly but should work. The question is: does the XML stored in a database starts with "<"
as a first
character or something else?

BTW. I'm quite surprised that it seems there is no way to explicitly tell the SQLTransformer
handle some columns as a serialized XML content that needs parsing...

Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message