Excellent, I’ll try that out J
Thanks again!
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 8:26
PM
To: [email protected]
Subject: RE: XHTML compliance
Hello Miles,
finally
I got it working the right way with the Neko parser (org.jahia.services.htmlparser.NekoHtmlParser),
.i.e. preserving lowercase of all tags and attributes and keeping the content
in XHTML format.
I
found out, that Neko DOMParser class
overrides the default DOM document class name in its constructor. So you need
to reset it manually:
The
following setting for DOMParser did work for me:
domParser.setProperty("http://cyberneko.org/html/properties/names/elems",
"lower");
domParser.setProperty("http://cyberneko.org/html/properties/names/attrs",
"lower");
domParser.setProperty("http://apache.org/xml/properties/dom/document-class-name",
"org.apache.xerces.dom.DocumentImpl");
and
the transformer method should be XML
serializer.setOutputProperty(OutputKeys.METHOD,
"xml");
These
settings helped me to keep the XHTML conformant content preserving the markup
cleanup feature.
Kind
regards
Sergiy.
|
"Miles Tillinger"
<[EMAIL PROTECTED]>
31.05.2006 07:29
|
|
Hi Sergiy,
I have got TinyMCE producing valid XHTML now. The page
link parsing in BigText fields sounds like a very useful piece of functionality
and is something our content editors have asked about in the past, however for
now I’m content to do without it.
Regards,
Miles.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 16, 2006 2:38 AM
To: [email protected]
Subject: RE: XHTML compliance
Hi Miles,
under the page link parsing, I ment the feature, where the cross-links, i.e.
page links that are used in BigText fields are parsed and stored in a separate
database table (jahia_link). These dependencies are used, e.g. for displaying a
warning message in case you are deleting a page, that is referenced in a
BigText field.
I do not know about any other usefull features: I have not investigated HTML
content parsing in depth. We are using FCKeditor, that does also produce valid
XHTML content, that is why I was looking for a place to disable the content
conversion :-)
Kind regards.
|
"Miles Tillinger"
<[EMAIL PROTECTED]>
15.05.2006 11:03
|
|
Hi Sergiy,
I would like to avoid disabling either of the Web-site settings, but at this
stage the only way I can get the code to be rendered XHTML compliant is by
disabling the HTML Tidy option.
I checked config.xml and it is using the NekoHTMLParser. I tried changing
the output method to both ‘xml’ and ‘xhtml’ and neither had any effect.
The main problem I am seeing when testing on simple XHTML is that tags are
rendered in uppercase. With the HTML Tidy (Neko) option disabled in Jahia
the markup is rendered exactly how it is saved by the Tiny MCE editor.
What benefit, if any, is there in running Neko over the content after it
has already been formatted by Tiny MCE?
I am able to leave the Markup Filtering option disabled, I haven’t experienced
any problems with that so far. Is this the option that allows page link
parsing?
Thanks,
Miles.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, May 12, 2006 4:51 PM
To: [email protected]
Subject: Re: XHTML compliance
Hello Miles,
there is several posibilities to achieve this.
The first one is to disable HTML content clean un and filtering via Jahia
Administration GUI (as Jahia root user --> Server Administration --> HTML
Editors --> Web-site settings --> Disable HTML clean up and Markup
Filtering).
If you decide to leave content clean up and markup filtering enabled (we did
so, bacause of other features, like page links parsing etc.) here is the second
posibility. Check which HTML parser is configured in config.xml under the key
'org.jahia.services.htmlparser.HtmlParser'.
I'm using Jahia 4.1 branch and this property by me is set to
'org.jahia.services.htmlparser.NekoHtmlParser'.
Now if you open the source code of the NekoHtmlParser class, you could find the
following line:
serializer.setOutputProperty(OutputKeys.METHOD,
"html");
If you change here the "html" to "xml", your HTML content
will remain XHTML conform.
You could also tune other transformer settings (indent etc.) the way aou want.
The same applies to the 'org.jahia.services.htmlparser.TidyHtmlParser'
implementation, if this one is configured in your config.xml.
Kind regards.
Sergiy.
|
"Miles Tillinger"
<[EMAIL PROTECTED]>
08.05.2006 03:32
|
|
Hi,
I am trying to enforce XHTML compliance on all fields, particularly BigText
fields. I’m trying to find where content submitted via BigText editor
form has some changes applied, e.g. tags converted to uppercase, <br
/> converted to <BR>, trailing slash removed from <img … /> tags
etc. more detail:
The following code from TinyMCE editor:
this is a <br />page break <img
src="" border="0" />
is ultimately stored as :
<html>this is a <BR>page
break <IMG
border="0" src="" </html>
I would like to disable the conversion to keep the content XHTML compliant (as
is applied by the TinyMCE editor I am using). Can you direct me to the
right place in the source?
Regards,
Miles.
IMPORTANT: This e-mail, including any attachments, may contain
private or confidential information. If you think you may not be the intended
recipient, or if you have received this e-mail in error, please contact the
sender immediately and delete all copies of this e-mail. If you are not the
intended recipient, you must not reproduce any part of this e-mail or disclose
its contents to any other party.
This
email represents the views of the individual sender, which do not necessarily
reflect those of education.au
limited except where the sender expressly states otherwise.
It is
your responsibility to scan this email and any files transmitted with it for
viruses or any other defects.
education.au limited will not be liable for any loss, damage
or consequence caused directly or indirectly by this email.
Global Summit 2006: Technology Connected
Futures -- 17-19 October, Sydney,
Australia.
Visit
our website http://globalsummit.educationau.edu.au
for further details.
IMPORTANT: This e-mail, including any attachments, may contain
private or confidential information. If you think you may not be the intended
recipient, or if you have received this e-mail in error, please contact the
sender immediately and delete all copies of this e-mail. If you are not the
intended recipient, you must not reproduce any part of this e-mail or disclose
its contents to any other party.
This
email represents the views of the individual sender, which do not necessarily
reflect those of education.au
limited except where the sender expressly states otherwise.
It is
your responsibility to scan this email and any files transmitted with it for
viruses or any other defects.
education.au limited will not be liable for any loss, damage
or consequence caused directly or indirectly by this email.