Hi Andreas, > Hi Gerd, > > [EMAIL PROTECTED] schrieb: > > Hi Andreas, > > > > just a short feedback to your hint to try UnescapeXmlTransformer: > > GREAT! :-) this is what I was looking for. > > thanks for the feedback! > > Was the transformer generic enough for your requirements, or did you > have to enhance it?
It was working "just out of the box" for me. The strings we unescape by the transformer contain just "simple" xhtml (links, divs, spans etc. some with class/id/style attributes). And for all that it works perfect. I insert and unescape the respective meta-values before the page2xhtml-XXX transformation so it's possible to apply templates in that transformation as well on these "unescaped" elements what also works very well - I really like all these possibilities! > Do you think it is useful enough to move it to the > project codebase? For me: absolutely yes! - I don't want to miss this anymore. ATM I use it as part of the feed module (I've downloaded it), but maybe it makes sense to add it more "general"? > > -- Andreas Best regards, Gerd > > > > > Best regards and many thanks, > > Gerd > > > > ----- original Nachricht -------- > > > > Betreff: Re: Lenya 2, resource type or custom metadata? > > Gesendet: Di, 03. Jun 2008 > > Von: Andreas Hartmann<[EMAIL PROTECTED]> > > > >> Hi Gerd, > >> > >> [EMAIL PROTECTED] schrieb: > >>> Hi Andreas, > >>> > >>> I tried with the custom metadata and basically it would be perfect > >>> for our needs if the (xml-)formatting would work... hopefully I only > >>> missed something in what I did: my test-value is "just <b>bold</b> > >>> text" (without the quotes). I configured the input module as > >>> described on the website > >>> (http://lenya.apache.org/docs/2_0_x/reference/metadata.html) and > >>> passed the value as parameter to the transformation. The value I get > >>> is "just <b>bold</b> text", exactly as it's stored in the > >>> file "en.meta". > >> yes, I'd also expect this behaviour. You could give the > >> UnescapeXmlTransformer in the feed module a try: > >> > >> "Transforms textual XML representations inside <unescape> elements to > >> actual XML elements, i.e. <unescape><a>foo</a></unescape> is > >> transformed to <unescape><a>foo</a></unescape>." > >> > >> > http://svn.apache.org/viewvc/lenya/sandbox/modules/feed/java/src/org/apache/ > > >> lenya/modules/feed/UnescapeXmlTransformer.java?view=log > >> > >> > >>> When I manually change the value in the file to my > >>> original test-value (see above) only "just text" is returned (the > >>> <b/> element is removed). > >> Yes, this is because the element content is treated as text in the > >> SourceNodeMetaDataHandler: > >> > >> String value = > >> DocumentHelper.getSimpleElementText(valueElements[valueIndex]); > >> > >> HTH, > >> -- Andreas > >> > >> -- > >> Andreas Hartmann, CTO > >> BeCompany GmbH > >> http://www.becompany.ch > >> Tel.: +41 (0) 43 818 57 01 > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > --- original Nachricht Ende ---- > > > -- > Andreas Hartmann, CTO > BeCompany GmbH > http://www.becompany.ch > Tel.: +41 (0) 43 818 57 01 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --- original Nachricht Ende ---- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
