|
[
Permlink
| « Hide
]
Ron Grabowski added a comment - 15/Jun/05 10:18 PM
If a value attribute is not found, loop through the child node to find the first CDATA or Text node and use its InnerText as the value.
It is possible to embed < and > in the current attribute value, just escape using < and >
I will have a look at the impact of your patch and see if it can be easily integraged - on first look it looks ok. I think we should probably concatenate any text or CDATA node text rather than taking the last one, but apart from that it looks ok. The code actually takes the first text or CDATA. That allows a comment to come before the text.
Another general benefit of being able to use CDATA is that you don't have squeeze potentially long marksup all on one line: <conversionPattern> <!-- Hello World --> <![CDATA[ <header> <date> <hour> %d{h} </hour> </date> <user> %u </user> <info> %m </info> </header> ]]> </conversionPattern> I quicklyt tried inserting tabs into the layout using \t, \\t, and '\t' but they always rendered as a literal. I didn't see a %tab pattern or a %space{5} pattern. If the text were concatenated, would this appear on one line in the output file? <conversionPattern> <!-- this text is ignored --> <![CDATA[%m ]]> <!-- this text is ignored --> <![CDATA[%d ]]> <!-- this text is ignored --> <![CDATA[%n ]]> </conversionPattern> It looks a little messy but I can think of some cases where it could be useful. Especially with describing custom patterns. Multiple CDATA sections will be concatenated together on a single line. Empty text nodes will be ignored (by the parser).
To embed a tab in the config file you need to use the XML numberic character reference 	 I have applied the patch with mods and all is well
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||