Hi,
I'm converting a XML file into XWiki pages with a structured object, my problem is that the XML file might contain elements with problematic text
I have a XSLT that gives me a velocity script (like below)
{{velocity}}
##Creating a ATE Question and Answer document programatically
#set($ATEPrefix = "CdLSATE")
#set($ATEDocName = $ATEPrefix+'TE'+1001)
#set($newATEQA = $xwiki.getDocument("CdLSATEPublic.$ATEDocName"))
##Set a title
$newATEQA.setTitle("Teeth Exfoliation")
##Set parent of document to Public ATE Questions and Answers
$newATEQA.setParent("CdLSATEPublic.CdLSATEPublicQAs")
##This is how you can use a template
$newATEQA.setContent('{{include document="CdlsatdCode.CdLSATEPublicQATemplate"/}}')
##Create a new object on the document
#set($newATEQAObject = $newATEQA.newObject("CdlsatdCode.CdLSATEPublicQAClass"))
##Set a field to a particular value
$newATEQAObject.set("AlphabetSort","TE")
$newATEQAObject.set("subject","Teeth Exfoliation")
$newATEQAObject.set("question","Is early loss of baby teeth something to be concerned about, indicative of a bigger problem, or related to CdLS?")
$newATEQAObject.set("language","en")
$newATEQAObject.set("CountryCode","us")
$newATEQAObject.set("answer","
It is normal for children, especially girls, to lose their lower two front teeth from 4.5 years old to 5.5 years old. 4.5 years is early, but can be considered normal. There seems to be quite a variety of times when children with CdLS find themselves loosing their primary or baby teeth. Children with CdLS can have their primary teeth fall out either early or, more often, late. If the child is four years old and there are no other underlying medical complications, such as, hypothyroidism, hypophosphatsia, etc., then I would not be too concerned about losing the teeth. If there were many teeth, including molars that are getting loose, then further investigations would be indicated.
DM/ TK 7-13-10
SEE ALSO: Teeth Grinding 1
Teeth Grinding 2
Teeth Growth
Teething")
$newATEQAObject.set("SACApproved",1)
$newATEQA.save()
{{velocity
$newATEQAObject.set("question","...") and $newATEQAObject.set("answer","...") give me challeges
Some text elements (not this example) will contain characters or combination of characters that will have a effect;
- on the script not being valid; the " (double bracket) character
- having a XWiki 2.0 meaning; "--" , "**" but intending something else
Help appreciated...
Gerritjan
One more tonight...
It seems that I am unable to use the built-in TOC macro for wiki
content which is generated dynamically from a Class Sheet {{include}}.
I assume this is because the TOC macro is rendered before (or
simultaneously with) the include macro which actually displays the
objects on the page, so as far as the TOC macro knows, there are no
wiki headings on the page (yet) to create an outline from.
Does anyone have any suggestions on how to parse through the final
rendered output of the wiki page to generate a table of contents for
dynamically generated wiki content? If I'm missing something with the
existing macro, that would be great...
What I am looking to do is write some code (preferably in a panel, I
think), which creates a TOC-style index of all the wiki-syntax
headings contained on the fully rendered page, after the content has
been generated from TextArea properties of a set of attached objects
to the page.
I have written custom display code that loops through every object of
a custom class attached to a page and then displays some of that
objects properties in a series of collapsible div's. Each object
contains two TextArea properties - one for WYSIWYG data, and one for
plain text, which would be formatted in wiki syntax. The result is a
list of each objects name with an expandable <div> full of the
wiki-rendered content contained in the TextArea properties. I would
like to generate a TOC which "reads through" that content and comes up
with a list of only the relevant headings under each displayed
"object"
For example, on a page with 3 objects, the custom display code in the
Class Sheet results in this (the wiki syntax appears fully rendered,
obviously):
Object 1 Name - Click to expand
******Hidden until clicked********
==Heading 2==
===Heading 3===
Normal text, etc...
Object 2 Name - Click to expand
******Hidden until clicked********
==Heading 2==
===Heading 3===
Normal text, etc...
Object 3 Name - Click to expand
******Hidden until clicked********
==Heading 2==
===Heading 3===
Normal text, etc...
I would like the TOC to return:
Object 1
Heading 2
Heading 3
Object 2
Heading 2
Heading 3
Object 3
Heading 2
Heading 3
Even when all the div's are initially collapsed/hidden. It would be
ideal if the TOC was clickable and went to the relevant anchor...
I can obviously use getValue() with each TextArea property to return a
string with that objects wiki syntax - but I don't have an easy way to
parse that string to only return the heading levels...
Any guidance would be appreciated.
Thanks,
aaron
Hi,
we are students on university and we are working on research grant.
We would like to use xwiki as foreground for our datamining project.
The system will collect and evaluate information about robotics
topics and then upload them to xwiki. Here will be users able to
comment, add anotations and tags and then system will teach from
these information and modify it's learning algorithm.
user name r3cop
Pavel Jurka
Hi,
- There seem to be some bad displays when a page title contains '<' or '>'.
Display is correct in browser title bar, it is also correct in main content
area, in hierarchy, but not in page title. For a page with title "TestTest >
test", generated html looks like this :
<div id="hierarchy">
TestTest > test
</div>
<div id="document-title">
TestTest* &*gt; test
</div>
The bad trick is that the "&" of ">" gets replaced by "&" ...
- as a side question, is there a way to easily do the equivalent of velocity
"$escapetool.html($text)", but in {{groovy}} ? I use mainly groovy in my
pages, and would like to avoid passing parameters between groovy and
velocity just for this one use-case ...
Thanks,
Jeremie
--
View this message in context: http://xwiki.475771.n2.nabble.com/Characters-or-bad-display-in-page-title-t…
Sent from the XWiki- Users mailing list archive at Nabble.com.
I received this reply when posting to the users(a)xwiki.org mailing list.
Is the list working?
-------- Forwarded Message --------
From: Mailer-Daemon <Mailer-Daemon(a)gedi.pt>
To: adrian.fita(a)gmail.com
Subject: NDN: [xwiki-users] How to display only activities in activity
stream from spaces
Date: Tue, 15 Nov 2011 19:57:38 +0000
Sorry. Your message could not be delivered to:
bneves,TeleGEDI (The name was not found at the remote site. Check that the name has been entered correctly.)
--
Fita Adrian
Hi.
In the main space, after login, any user can see the activities from all
the spaces. I want the Activity Stream to display activities only from
the spaces that the user has access to. How can I do this?
Thanks,
--
Fita Adrian
Hello!
If I have in some class a boolean property, how I can get date&time of its
last modification (date when ONLY this property was modified last time)
inside my code?
Thanks beforehand!
Eugen Colesnicov
--
View this message in context: http://xwiki.475771.n2.nabble.com/get-date-time-of-some-class-property-modi…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi all,
I tried to use native rendering method as it suggests in the Formula
Macro Extension page, that is to
* Install A TeX package
* Install ImageMagick
* Sure that latex, dvips, convert can be called from cmd
And then add "macro.formula.renderer=native" into xwiki.properties.
But it doesn't work, and there are the same problems as a earlier post
"*Formula* *Macro* - *native* renderer issue
<http://markmail.org/message/ij2fl6muxoyl3xzx>", namely infinite loading...
Anyone any ideas?
Thanks!!!