Giter VIP home page Giter VIP logo

Comments (6)

maybeec avatar maybeec commented on June 18, 2024

I had a look at at this special case an observed following reformatting of the XML, which might cause the problem. Other changes in the XML do not affect MergeFields.

was - valid for processing with xdocreport (freemarker):

<w:p w:rsidR="00961FEC" w:rsidRPr="00E8332D" w:rsidRDefault="00E4009A" :rsidP="00D52AAA">
    <w:pPr>
        <w:ind w:left="-550"/>
        <w:rPr>
            <w:rFonts w:cs="Arial"/>
            <w:sz w:val="10"/>
            <w:szCs w:val="22"/>
        </w:rPr>
    </w:pPr>
    <w:r>
        <w:fldChar w:fldCharType="begin"/>
    </w:r>
    <w:r w:rsidR="00327443">
        <w:instrText xml:space="preserve"> MERGEFIELD  "#foreach($i in [0..$all])"  \* MERGEFORMAT </w:instrText>
    </w:r>
    <w:r>
        <w:fldChar w:fldCharType="separate"/>
    </w:r>
    <w:r w:rsidR="00327443">
        <w:rPr>
            <w:noProof/>
        </w:rPr>
        <w:t xml:space="preserve">«#foreach($i in </w:t>
    </w:r>
    <w:r w:rsidR="00327443">
        <w:rPr>
            <w:noProof/>
        </w:rPr>
        <w:lastRenderedPageBreak/>
        <w:t>[0..$i»</w:t>
    </w:r>
    <w:r>
        <w:fldChar w:fldCharType="end"/>
    </w:r>
</w:p>

after saving again (only adding a whitespace) - NOT valid for processing with xdocreport (freemarker):

<w:p w:rsidR="00961FEC" w:rsidRPr="00E8332D" w:rsidRDefault="00934AF1" w:rsidP="00D52AAA">
    <w:pPr>
        <w:ind w:left="-550"/>
        <w:rPr>
            <w:rFonts w:cs="Arial"/>
            <w:sz w:val="10"/>
            <w:szCs w:val="22"/>
        </w:rPr>
    </w:pPr>
    <w:fldSimple w:instr=" MERGEFIELD  &quot;#foreach($i in [0..$all])&quot;  \* MERGEFORMAT ">
        <w:r w:rsidR="00327443">
            <w:rPr>
                <w:noProof/>
            </w:rPr>
            <w:t xml:space="preserve">«#foreach($i in </w:t>
        </w:r>
        <w:r w:rsidR="00327443">
            <w:rPr>
                <w:noProof/>
            </w:rPr>
            <w:lastRenderedPageBreak/>
            <w:t>[0..$i»</w:t>
        </w:r>
    </w:fldSimple>
</w:p>

Do you think this is the problem?

from xdocreport.

maybeec avatar maybeec commented on June 18, 2024

Same for the #end tag:

was - valid for processing with xdocreport (freemarker):

<w:r>
    <w:fldChar w:fldCharType="begin"/>
</w:r>
<w:r w:rsidRPr="00216279">
    <w:rPr>
        <w:lang w:val="en-US"/>
    </w:rPr>
    <w:instrText xml:space="preserve"> MERGEFIELD  #end  \* MERGEFORMAT </w:instrText>
</w:r>
<w:r>
    <w:fldChar w:fldCharType="separate"/>
</w:r>
<w:r w:rsidR="007C2AFD" w:rsidRPr="00216279">
    <w:rPr>
        <w:rFonts w:cs="Arial"/>
        <w:sz w:val="20"/>
        <w:lang w:val="en-US"/>
    </w:rPr>
    <w:t>«#end»</w:t>
</w:r>
<w:r>
    <w:fldChar w:fldCharType="end"/>
</w:r>

after saving again (only adding a whitespace) - NOT valid for processing with xdocreport (freemarker):

<w:fldSimple w:instr=" MERGEFIELD  #end  \* MERGEFORMAT ">
    <w:r w:rsidR="007C2AFD" w:rsidRPr="00216279">
        <w:rPr>
            <w:rFonts w:cs="Arial"/>
            <w:sz w:val="20"/>
            <w:lang w:val="en-US"/>
        </w:rPr>
        <w:t>«#end»</w:t>
    </w:r>
</w:fldSimple>

from xdocreport.

angelozerr avatar angelozerr commented on June 18, 2024

Sorry this XDocReport github is just a copy of our XDocReport google git project. I don't follow it but now I watch it.

first of all thanks for xdocreport! Very useful and nice library!

Thank's!

Maybe it is possible to synchronize this repository with the one of google code? Otherwise this one here is a little bit out of date, isn't it?

@pascalleclercq could you explain more how to you synchronize it, please.

I think with github it would be much easier to fork your repository and provide pull requests :)

I agree with you, perhaps we should do that, but a lot of people knows our git google.

I would like to find contributors for XDocReport because today it's difficult for me to find time for XDocReport because I'm very busy with my other open source project https://github.com/angelozerr

If you think you could contribute, I think it should be a good idea to move XDocReport to github.

What do you think @pascalleclercq ?

Maybe also a short question, why I am trying to get into your code: Is there any entry point in your code for extracting the freemarker / velocity code out of a docx file?

Yes, this feature is done with preprocessing. We have done a lot of JUnits at https://code.google.com/p/xdocreport/source/browse/#git%2Fintegrationtests%2Ffr.opensagres.xdocreport.core.test%2Fsrc%2Ftest%2Fjava%2Ffr%2Fopensagres%2Fxdocreport%2Fdocument%2Fdocx%2Fpreprocessor

It should be very cool if you could contribute with a new JUnit test which fixes your problem. Thank's!

Regard's Angelo

from xdocreport.

maybeec avatar maybeec commented on June 18, 2024

Maybe I could have a look at this issue if I find time and can fork the project on github :)

Here a nice undocumented feature of Git, to push to several git repositories at the same time:
http://dereenigne.org/git/git-multiple-remotes
Using this feature you can support both---GitHub and Google Code---without configuring a dedicated rsync or whatever you like.

from xdocreport.

pascalleclercq avatar pascalleclercq commented on June 18, 2024

Hi all,

I confirm I used to push on several git repo with EGit in the past. It's really easy to configure multiple URL with EGit.

Unfortunatly I faced several issues with github and I stopped to sync several months ago.

Maybe It's time to give another try.

The reason why I sync xdocreport on github is to increase the visibility of the project.

from xdocreport.

angelozerr avatar angelozerr commented on June 18, 2024

@may-bee It should be very cool if you can create a JUnit with your case like https://code.google.com/p/xdocreport/source/browse/integrationtests/fr.opensagres.xdocreport.core.test/src/test/java/fr/opensagres/xdocreport/document/docx/preprocessor/Issue401.java

from xdocreport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.