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? Do you think it is useful enough to move it to the project codebase?

-- Andreas


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]

Reply via email to