[dev] [horde] Help File syntax

Ralf Lang lang at b1-systems.de
Fri Mar 9 11:48:03 UTC 2012


Am 21.02.2012 14:32, schrieb Jan Schneider:
>
> Zitat von Ralf Lang <lang at b1-systems.de>:
>
>> Is this intended or a bug?
>>
>> <entry id="XXXAPP-overview">
>> <title>XXXAPP Title</title>
>> <para>Hier bekommen Sie weitere Informationen</para>
>>
>> <heading>Informationen und Handbuch</heading>
>> <para>Übersicht XXXAPP Service</para><para><eref
>> url="http://www.XXXAPP.de/XXXAPP">http://www.XXXAPP.de/XXXAPP</eref></para>
>>
>>
>> ....
>>
>> This one works. If I don't wrap the eref into a <para></para>, it's
>> not displayed. If I wrap the <eref> together with other content like
>> this:
>> <para>sometexthere<eref url="kk">kk</eref></para>, then sometexthere
>> is not displayed.
>>
>> If this is intended syntax, I will write a little example. If this is
>> a bug, I will open a bug report.
>
> Sounds like bug. A quick look at the help parser didn't reveal any
> obvious reasons for that behavior though.
>

I think it's _processNode.
It only returns the node's value if there are no children.

SimpleXML cannot deal with DOM style mixing of text content and children.

Solutions:

Internally convert text content to <text>text</text> nodes before 
passing to simpleXml (rather ugly)

Using DOM instead of SimpleXml for parsing
I don't consider the latter a BC break because the help is part of 
Horde_Core and Horde_Core depends on php-dom

I'll try this.

-- 
Ralf Lang
Linux Consultant / Developer
Tel.: +49-170-6381563
Mail: lang at b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537


More information about the dev mailing list