[opencms-dev] Static Export - opencms-importexport.xml - Singlefile rule does not work!

] Code Create [ Bernd Wolfsegger bw at code-create.com
Tue May 25 16:12:17 CEST 2010


Well, hi Andrea and everyone,

perhaps there is a solution already, but I encountered the same problem now
with OpenCms 7.5.1 ...

So in the Alkacon Documentation there is explicitly mentioned that something
like this is possible:

    <export-rule>
        <name>mysite-news</name>
        <description>This rule will export the index.html and the news.html
files in folder /sites/mysite/,
                     if any resource under /sites/mysite/modules/news/ is
modified</description>
        <modified-resources>
            <regex>sites/mysite/modules/news/.*</regex>
        </modified-resources>
        <export-resources>
            <uri>/sites/mysite/index.html</uri>
            <uri>/sites/mysite/news.html</uri>
        </export-resources>
    </export-rule>

But in fact, it is not possible.
With this configuration the changed resource only will get exported.

Is this a bug ?

Kind regards, Bernd



> -----Ursprüngliche Nachricht-----
> Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-
> bounces at opencms.org] Im Auftrag von Andrea Puddu
> Gesendet: Mittwoch, 25. Februar 2009 14:52
> An: The OpenCms mailing list
> Betreff: Re: [opencms-dev] Help Static Export - opencms-
> importexport.xml
> 
> Hi Christian,
> thanks a lot for your suggestion, it make sense.
> 
> However I think that working on the export property would have an
> unwanted "side-effect".
> 
> Following my example case if I set export 'false' for
> 
> /sites/mysite/
> 
> 
> I would have the inheritance of export modified for the subfolders of
> mysite (subtree).
> 
> I guess I can re-set every export property of the child folders of
> mysite so that export= 'true' and thus rebuild the "export chain" for
> the subtree.
> 
> 
> So the question still remain: why can't export a single file by static
> export regex/rule? (ref. opencms-importexport.xml)
> 
> 
> Any idea about it?
> Thanks!
>    Andrea
> 
> 
> ---------------------------
> Andrea Puddu
> docpuddu at tiscali dot it
> http://www.linkedin.com/in/andreapuddu
> -------------------------------------------
> 
> 
> 
> Christian Steinert ha scritto:
> > Hi Andrea
> >
> > if you want to export only some resources then the following should
> also work, instead of fiddling with RegExps:
> > - Set the file system property "export" to "false" for the folder
> that contains your files
> > - Set the same file system property to "true" for only the file that
> you want to be exported
> > - Configure your export settings so that the folder that contains
> your file gets exported
> >
> > This should do the trick and cause opencms to export only your one
> file - in this case probably the xml sitemap for your site
> >
> > hth
> > Christian
> >
> >
> >
> >> Hi Andrea,
> >>
> >> are you familiar with regular expressions
> >> http://www.regular-expressions.info/quickstart.html?
> >> There is an interesting Tutorial on the export mechanism:
> >> http://www.opencms-forum.de/opencms-forum/viewthread?thread=1279
> >> It's not one of my strengths either, but I think it should look
> something
> >> like:
> >> <regex>/sites/mysite/articles/onlyFileToExport.html</regex>
> >>
> >> The following doesn't seem to make any sense to me:
> >>  <uri>/sites/mysite/map.xml</uri>
> >>
> >> Why are you trying to export one file only anyway?
> >> Greetings
> >> Marc
> >>
> >>
> >> Andrea Puddu-2 wrote:
> >>
> >>> Hi everybody,
> >>> has anyone tried an export rule where the export action involves
> just one
> >>> file?
> >>> Have a look at the following (from opencms-importexport.xml):
> >>>
> >>> (...)
> >>> <export-rule>
> >>>         <name>My Rule</name>
> >>>         <description>
> >>>                 exports a single file (map.xml) when a new article
> is
> >>> published
> >>>         </description>
> >>>         <modified-resources>
> >>>                 <regex>/sites/mysite/articles/.*</regex>
> >>>         </modified-resources>
> >>>         <export-resources>
> >>>                 <uri>/sites/mysite/map.xml</uri>
> >>>         </export-resources>
> >>> </export-rule>
> >>> (...)
> >>>
> >>>
> >>> In my experience it seems not possible to export a single file, so
> you
> >>> should
> >>> have something like:
> >>> <uri>/sites/mysite/</uri>
> >>>
> >>> But in this case, every resources inside /sites/mysite/ will be
> exported
> >>> as well, unfortunately.
> >>>
> >>> I know that I can make a specific folder like
> /sites/mysite/specific/
> >>> and put the "map.xml" inside... (so that only map.xml will be
> exported)
> >>> but it would be nice if I could export a single file without using
> >>> this work-around tecnique.
> >>>
> >>> Has anyone experienced the same? Any idea about it?
> >>> Thanks!
> >>>    Andrea
> >>>
> >>>
> >>> ---------------------------
> >>> Andrea Puddu
> >>> docpuddu at tiscali dot it
> >>> http://www.linkedin.com/in/andreapuddu
> >>> -------------------------------------------
> >>>
> >>>
> >>> _______________________________________________
> >>> This mail is sent to you from the opencms-dev mailing list
> >>> To change your list options, or to unsubscribe from the list,
> please visit
> >>> http://lists.opencms.org/mailman/listinfo/opencms-dev
> >>>
> >>>
> >>>
> >> --
> >> View this message in context: http://www.nabble.com/Help-Static-
> Export---opencms-importexport.xml-tp21999653p22119722.html
> >> Sent from the OpenCMS - Dev mailing list archive at Nabble.com.
> >>
> >>
> >> _______________________________________________
> >> This mail is sent to you from the opencms-dev mailing list
> >> To change your list options, or to unsubscribe from the list, please
> visit
> >> http://lists.opencms.org/mailman/listinfo/opencms-dev
> >>
> >>
> >
> >
> > ____________________________________________________________________
> > Psssst! Schon vom neuen WEB.DE MultiMessenger gehört?
> > Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123
> >
> >
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://lists.opencms.org/mailman/listinfo/opencms-dev
> >
> >
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list