Are you sure "Sandbox.testImageCount'" is the right reference ? Do you
have something when you print $test2Doc.content ?

If "Sandbox.testImageCount" does not exist maybe you need to try
"Sandbox.testImageCount.WebHome".

On Mon, Dec 5, 2016 at 4:24 PM, Gerritjan Koekkoek
<gerrit...@cdlsworld.org> wrote:
> I fail to understand the rendering framework suggestion
>
> #set($test2Doc = 
> $xwiki.getDocument('Sandbox.testImageCount').getTranslatedDocument())
>
> $test2Doc.getDocument().getXDOM().getBlocks("class:ImageBlock", "DESCENDANT")
>
> Gives me a empty array, although the source document  looks like this (XWiki 
> 2.1)
>
> Dit is text
> Dit is text
> Dit is text
>
> [[image:logo-amc.png]]
> Dit is textDit is text
> Dit is textDit is text
> Dit is textDit is text
> Dit is textDit is text
> Dit is textDit is text
> Dit is textDit is text
>
> Note that I would like to extract from this: "logo-amc.png"
>
>
> Gerritjan Koekkoek
> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
> Visit our website<http://www.cdlsworld.org>
> Facebook<https://www.facebook.com/gerritjan.koekkoek>
> email<gerrit...@cdlsworld.org>
>
>
>
> ________________________________
> From: users <users-boun...@xwiki.org> on behalf of Thomas Mortagne 
> <thomas.morta...@xwiki.com>
> Sent: 02 December 2016 11:41:40
> To: XWiki Users
> Subject: Re: [xwiki-users] Content conversion
>
> On Fri, Dec 2, 2016 at 11:02 AM, Gerritjan Koekkoek
> <gerrit...@cdlsworld.org> wrote:
>> Is it possible to get what images are inside a content page.
>>
>> Note I do not mean Attached images, but the images displayed inline in the 
>> content
>
> You can parse any content into XDOM and then search for ImageBlock in
> it. See 
> http://rendering.xwiki.org/xwiki/bin/view/Main/GettingStarted#HExamples.
>
>>
>>
>> Is it also possible to display the content without these images, as plain 
>> Text (also remove the wiki-markup )
>
> We usually use plain text rendered (id "plain/1.0") for this.
> Basically you use rendering framework to parse the content and then
> serialize it with a special plain text renderer.
>
>>
>>
>> Gerritjan Koekkoek
>> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
>> Visit our website<http://www.cdlsworld.org>
>> Facebook<https://www.facebook.com/gerritjan.koekkoek>
>> email<gerrit...@cdlsworld.org>
>>
>>
>>
>
>
>
> --
> Thomas Mortagne



-- 
Thomas Mortagne

Reply via email to