Greetings
It's possible to rename a tag present in diferent pages at once, or the only way is opening all the pages
where it is and rename it?
Best regards
Bruno Neves
Hi Vincent,
1) add props.setPruneTags("script, style"); in DefaultHTMLCleaner.
This will remove all the script and style tags and their contents.
script and style tags are useless for the later use, IMO.
2) remove the first p tag following th li tag.
<ul>
<li><p>test</p></li>
</ul>
could not render properly in xwiki syntax 1.0 and
xhtmlparser+xwikisyntaxrendering.
It should change to
<ul>
<li>test</li>
</ul>
I have a filter with w3c dom:
http://svn.xwiki.org/svnroot/xwiki/sandbox/xwiki-plugin-officeimporter/src/…
Maybe can help. If you need a jdom version, I can provide it later if necessary.
3) empty link. like <a/> <a href="">test</a> <a>something</a>
http://svn.xwiki.org/svnroot/xwiki/sandbox/xwiki-plugin-officeimporter/src/…
this filter can remove empty link tag.
Thanks
Wang Ning
Hi Vincent,
Sorry for not send the mail to the dev list. I just reply the mail.
On Sun, Aug 24, 2008 at 4:15 PM, Vincent Massol <vincent(a)massol.net> wrote:
>
> On Aug 24, 2008, at 6:40 AM, Wang Ning wrote:
>
>> Hi,
>>
>> Yes, I think it's necessary, if the client want to control the output
>> directory.
>
> Ok I've thought a bit about this and here's what I propose:
>
> 1) Introduce a new ConverterOutput interface with the following methods:
> - saveImage(String imageName, InputStream imageData);
> - saveDocument(InputStream documentData);
>
> 2) Modify Converter interface to be:
>
> void convert(InputStream sourceData, OfficeDocumentType sourceType,
> ConverterOutput outputData, OfficeDocumentType outputType);
>
> 3) Provide 1 implementation of ConverterOutput for the moment (+ a mock one
> for the unit tests of the Converter): XWikiDocumentConverterOutput. This
> implementation stores the result of the conversion in a XWiki Document (it's
> name/location is passed in the constructor). In the future if we need other
> implementations we could add them (like a FileConverterOutput, etc) but
> they're not needed for now.
>
> Note 1: 3) is much cleaner and allows to move some of the code in the plugin
> to the XWikiDocumentConverterOutput class.
> Note 2: We can fully read the sourceData internally to save the input data
> to a file in a XWiki temporary directory (and thus control the output of the
> image files by jodconverter)
If want to get the xwiki temp directory to handle the output dir of
conversion in OfficeConverter, I need use
context.getWiki().getTempDirectory(context) to get the xwiki temp dir.
But I don't think I can get the xwiki temp without a xwik context.
Maybe the interface should change to
void convert(InputStream sourceData, OfficeDocumentType sourceType,
ConverterOutput outputData, OfficeDocumentType outputType,
XWikiContext context) throws OfficeConverterException;
WDYT?
--
Thanks
Wang Ning
syam_kg wrote:
>
> Hi
>
> In the Registartion section of Admin Preferences,there is a field 'Check
> Active fields for user authentication'. Could anybody please tell me what is
> meant by this. Also please explain what should be put into the fields
> 'Validation e-Mail Content ','Confirmation e-Mail Content' and 'Invitation
> eMail Content' and how xwiki validates the registration.
>
Selecting "Use email verification" causes a verification email to be
sent to the email address provided by the user at registration. Still,
this doesn't prevent the user from logging in and using his account
until following the validation link in that email.
On the other hand, selecting "Check Active fields for user
authentication" does exactly this: prevent the user from using his
account until following the validation link.
Last night I committed some values for the validation and confirmation
email, which will be part of XWiki Enterprise starting with 1.6M1. Until
1.6 is released, you can put these in your wiki:
Validation email content:
#set($wikiurl = $xwiki.getDocument("Main.WebHome").getExternalURL())
#set($wikiname = $wikiurl.substring($wikiurl.indexOf("//")))
#set($wikiname = $wikiname.substring(2, $wikiname.indexOf("/", 3)))
Subject: Validate your account on $wikiname
Hello $xwiki.getUserName("XWiki.$xwikiname", false),
This email address was used to register a new account on ${wikiname}. If
you did not make the request, please ignore this message.
In order to activate your account, please follow this link:
$xwiki.getDocument("XWiki.AccountValidation").getExternalURL("view",
"validkey=${validkey}&xwikiname=${xwikiname}")
Confirmation email content:
#set($wikiurl = $xwiki.getDocument("Main.WebHome").getExternalURL())
#set($wikiname = $wikiurl.substring($wikiurl.indexOf("//")))
#set($wikiname = $wikiname.substring(2, $wikiname.indexOf("/", 3)))
Subject: Your account on $wikiname has been activated
Hello $xwiki.getUserName("XWiki.$xwikiname", false),
Your account on $wikiname has been successfully activated. You can now
login at $xwiki.getDocument("XWiki.XWikiLogin").getExternalURL("login")
using your username ($xwiki.getDocument($xwikiname).getName()).
You must also create a wiki page at XWiki/AccountValidation and put this
content:
#if("$!{request.validkey}" != "" && "$!{request.xwikiname}" != "")
#if($xwiki.validateUser(true) == 0)
#set($loginURL = $xwiki.getURL('XWiki.XWikiLogin', 'login'))
#info("Your account has been activated. You can now <a
href='${loginURL}'>login</a>.")
#else
#warning("There was a problem validating your account. Please
contact an administrator.")
#end
#else
$response.sendRedirect($xwiki.getURL("Main.WebHome"))
#end
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi Vincent,
I try to make the xhtmlparser work for the link. I have see the test
case links.test in xwiki-core-rendering.
I have some questions.
1) the xhtmlparser don't handle the rel attribute. Because wikimodel
don't pass the information in xhtmlparser. see
http://code.google.com/p/wikimodel/issues/detail?id=47. When this is
fixed, I think rel can works.
2) The output of <a href="mailto:john@doe.com">mailto:john@doe.com</a>
should be [[mailto:john@doe.com>mailto:john@doe.com]] but not
[[mailto:john@doe.com]]. We should not remove the label information of
mailto. Consider if the input is <a href="mailto:john@doe.com">Contact
me</a>, the output should be [[mailto:john@doe.com>Contact me]]
--
Thanks
Wang Ning
Hi,
I'd like to discuss the granularity we want to have for our
applications. This discussion was prompted by the recent password-
reset application. There are some pros and cons I think of having
small applications.
Pros:
- better compartimentation
- different release cycle
Cons:
- heaviness of release (separate XAR; etc)
- different release cycle
- fragmentation
My personal take is that this application should go under the
administration application so that it's released together with it (it
could be a sub module that is aggregated in the final XAR for the
admin app.).
WDYT?
Thanks
-Vincent
The new JDBC driver for postgresql 8.3.3 supports set/getcatalog()
now. Does that mean we can finaly use it with virtual xwiki ?
cheers
Michal
Michal Bielicki, COSO, Member of the Board
HaloKwadrat | ul. Polna 46/14, 00-644 Warszawa
t. +48228753290 x 203 | f. +48228753291
michal.bielicki(a)halokwadrat.pl | w. www.halokwadrat.pl
Knowledge & Low Prices. Guaranteed!
Halo Kwadrat Sp. z o.o.
z siedzibą w Warszawie przy ulicy Polnej 46/14,00-644 Warszawa
wpisana została do rejestru przedsiębiorców prowadzonego przez
Sąd Rejonowy dla M.ST.Warszawy w Warszawie, XII Wydział Krajowego
Rejestru Sądowego pod numerem
KRS 0000153539. NIP 525-22-59-473
Wysokość kapitału zakładowego: 50000,00 PLN
----------------------------------------------------------------------------
Wiadomość ta jest przeznaczona jedynie dla osoby lub podmiotu
będącego jej adresatem
i może zawierać poufne lub uprzywilejowane informacje. Zabronione
jest przeglądanie,
przesyłanie, rozpowszechnianie lub inne wykorzystywanie tych
informacji, jak również
podejmowanie działań na ich podstawie, przez osoby lub podmioty inne
niż zamierzony adresat.
Jeżeli otrzymali Państwo tę wiadomość przez pomyłkę, prosimy o
poinformowanie o tym nadawcy
i usunięcie jej z komputera.
Hi Vincent,
When I implement the XWikiDocumentConvertOutput, I meet some pb. I
understood that the XWikiDocumentConvertOutput contain a xwiki
document, and it will store the result html to the xwikidocument as
content, store the images to the xwikidocument as the attachments, and
save this xwiki document to the xwiki.
But we should separate the officeconverter from xwiki core, so
XWikiDocumentConvertOutput can't get any information about xwiki
contex, right?
Problems with this design:
1) when I use the saveDocument() method to save the inputstream to
document content, I need convert inputstream to html. But I can't get
the encoding of the xwiki because I can't access the xwiki context.
2) I can't set the attachments' author, because have no idea about the
author without context.
3) I can't save the xwikidocument to the xwiki without the xwiki context.
4) Maybe we can just save everything in the xwiki document and get it
from ConverterOutput and set author, then save it to the xwiki. If so,
we need a method getDocument() in ConverterOutput to get the document.
5) Actually, not all the accessory output is image. So the saveImage
interface is not appropriate.
Why we use ConverterOutput? I think because:
1) the output of conversion(especially convert to html) have no only
one output, so we just use ConverterOutput to save all this outputs
and their names for later use.
2) Maybe the special ConverterOutput like XWikiDocumentConvertOutput
can handle the coversion result to the special destination in special
format.
I think 2) is not right, because it make the office convert connected
to xwiki context.
So I proposal ConverterOutput is just a data structure to store the
output results and their name. My proposal is:
public interface ConverterOutput
{
/**
* Save the target contents in {@link InputStream} to the output
destination. And save the document's name as the
* main output file's name.
*
* @param documentName the name of the source content
* @param documentData the source data
*/
void saveDocument(String documentName, InputStream documentData);
/**
* Save the other output files like images, other htmls to the
output destination. In most case, this method will be
* used when convert office convert to html.
*
* @param accessoryName the accessory name
* @param accessoryData the accessory content
*/
void saveAccessory(String accessoryName, InputStream accessoryData);
/**
* @return the main document
*/
InputStream getDocument();
/**
* @return return the main document's name
*/
String getDocumentName();
/**
* @return the accessories of this document. The map's key is the
accessory's name.
*/
Map<String, InputStream> getAccessories();
}
I implement the office converter with this interface. Please review
the code at your convenience.
--
Thanks
Wang Ning