Richard Frovarp wrote:
Okay, I did that and was still getting errors about the br tag. Tracked it down to a bug in Fckeditor.java. Posted bug and patch to bugzilla. Now it throws all sorts of error about a variety of table properties, but not br's or align.
Cool, so you were able to at least fix this.
I may just turn validation off, unless you have a better idea. Being able to turn the border on in a table is a nice thing to be able to do, and the validator doesn't like how FCK is doing that.
Well, you could do the same thing as with the br's and rewrite your table border as a style attribute when you save,
or you can modify your schema (or a part/module of it)

copy the xhtml schema rng module that handles table attributes from the xhtml module to your pub ({youpub}/lenya/modules/xhtml/resources/schemas/xhtml/modules/)

edit it to suit the way fck handles tables.

Richard

Doug Chestnut wrote:

Doesn't work for me either :(
I had a look at my publications and I have just copied the original clean-xhtml.xsl and added to it.

--Doug

Doug Chestnut wrote:

I will take a look at it this evening, sorry for the difficulties.

--Doug

Richard Frovarp wrote:

That whole thing seems to be messed up. Without putting your replacement in, it is firing errors with the default file from the xhtml module:

SystemId Unknown; Line #23; Column #100; Had IO Exception with stylesheet file: fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/kupusave.xsl SystemId Unknown; Line #24; Column #85; Had IO Exception with stylesheet file: fallback://lenya/modules/bxe/xslt/change-object-path-back.xsl


Doug Chestnut wrote:



Richard Frovarp wrote:

Okay, I am doing something wrong here. I'm guessing that your first apply-templates should have a slash at the end.



yep, sorry


However, after cleaning that up, I get from the fallback on the command line running Lenya:

SystemId Unknown; Line #26; Column #93; Had IO Exception with stylesheet file: template-fallback://template1//lenya/modules/xhtml/xsl/clean-xhtml.xsl



hmm, try it without the template1// (should work for most cases)

--Doug



Doug Chestnut wrote:

create a clean-xhtml.xsl in your pub:
{yourpub}/lenya/modules/xhtml/xslt/clean-xhtml.xsl

[xsl begin stuff]

<!-- import templates clean-xhtml.xsl stylesheet -->
<xsl:import href="template-fallback://{yourpub}//lenya/modules/xhtml/xslt/clean-xhtml.xsl" />

<!-- remove invalid <br /> elements -->
<xsl:template match="xhtml:body/xhtml:br" />

<!-- remove that nasty @align that shows up in the table -->
<xsl:template match="xhtml:[EMAIL PROTECTED]" >
  <xsl:copy>
<xsl:apply-templates select="@*[name()!='align'][name()!='style']" > <xsl:attribute name="style">align:<xsl:value-of select="@align"/>;<xsl:value-of select="@style" /></xsl:attribute>
  </xsl:copy>
</xsl:template>

[xsl end]

I didn't try the above, so not sure it works, but it would go something like that. I know that it is not ideal to fix the editors code on save, but the error below is a big usability no-no.

I have been thinking about turning off bxe validation for my pubs, and just fixing problems as they are saved. The user might get some unexpected content changes, but that is easier to explain (content must adhere to our standards) than cryptic error messages.

You might also want to look at the fck module, it has the option of using tidy (given a properties file) and the above clean-{type} method. Users can go to town screwing up the source if they wish, and all is forgiven on the server side.

--Doug

Richard Frovarp wrote:

Well, first it does tend to dump <br/>'s in, which fail validation: element "br" from namespace "http://www.w3.org/1999/xhtml"; not allowed in this context

The table problem:

attribute "align" not allowed at this point; ignored

org.apache.cocoon.ProcessingException: Error calling continuation at file:/home/rfrovarp/lenya-1.4.x/build/lenya/webapp/lenya/usecases/usecases.js:269 at <map:call> - file:/home/rfrovarp/lenya-1.4.x/build/lenya/webapp/lenya/usecases/usecase.xmap:91:39 at <map:mount> - file:/home/rfrovarp/lenya-1.4.x/build/lenya/webapp/lenya/usecase.xmap:56:128 at <map:mount> - file:/home/rfrovarp/lenya-1.4.x/build/lenya/webapp/global-sitemap.xmap:313:105 at <map:mount> - file:/home/rfrovarp/lenya-1.4.x/build/lenya/webapp/sitemap.xmap:632:106

The part from the stack trace is:

Caused by: org.apache.lenya.cms.usecase.UsecaseException: org.xml.sax.SAXParseException: attribute "align" not allowed at this point; ignored at org.apache.lenya.cms.usecase.AbstractUsecase.execute(AbstractUsecase.java:269)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


Since it is using reflection, I'm not really sure which code it goes into.

Richard

Doug Chestnut wrote:

Whats the error?

BXE is using relaxNG, should be the same as when it is saved (and validated again), although bxe uses a different validator than lenya server side.

You might want to look at the clean-xhtml.xsl (or xhtml-clean.xsl) stylesheet to clean up bxe boo-boos.

--Doug

Richard Frovarp wrote:

If you create a new page, delete existing content, then insert a table and hit save, an error is thrown that seems to indicate that the resulting page is not validated against whatever it uses to validate (DTD, Schema, RelaxNG, haven't looked). Anyone know how to get FCKEditor completely working?

Thanks,

Richard





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to