The client here has been heavily sold on Visual Format Editor and TeamSite Templating to replace FrontPage, etc. We are using templating to generate and deploy XML to the servers, then using XSLT to translate at runtime. For this to work I think I have to configure VFE to generate XHTML. But even when I do this, it doesn't always seem to work/generate valid XHTML - especially when the users cut and paste from the legacy content. For instance the following error was detected by the XSLT system:
The '@' character, hexadecimal value 0x40, cannot be included in a name
The problem turned out to be with this text in an element generated by a VFE:
<MAILTO:user@host.tld>. </MAILTO:user@host.tld>
I believe @ is invalid in an XML element name (
http://www.w3.org/TR/REC-xml#NT-Name). Is there any way to force VFE to generate well-formed XML (preferably XHTML that conforms to the strictest XHTML DTD) without writing something custom?
I know that I can limit the buttons that appear in the UI, but this doesn't seem to help with cut and paste - for instance there is no MAILTO button, but somehow the tag above was pasted into the textarea. Is there any way to force that the only tags allowed are those that can be generated by the button bar?
There is a rule here that the content body cannot contain links (related links, etc. must be entered in a replicant so they can be stored in a structure rather than in unstructured HTML). I couldn't figure out how to remove hyperlink item from the VFE context menu. Does anyone know if this is possible?
I can think of a few workarounds I would prefer to avoid. One would be to have the presentation template clean up the code. Better would be that the invalid data is not stored to the DCR in the first place - that way I don't have to worry about it whether I am parsing it in a .TPL, in a Perl module, or with a Java class. I think that unless it is possible to configure VFE to disallow everything not on the button bar, this means FormAPI on every VFE-enabled field. I guess it would strip out everything except those few tags which are specifically allowed. Has anyone done anything like this? I wonder if it would affect performance, which already seems pretty bad, especially when I add a custom CSS to VFE and perform other customizations. And every once in a while it tells me my custom Word dictionary cannot be loaded - does anyone else get errors like this?
How do you get it to apply a class tag by default to the <P> tags it generates?
I have only spent about 20 minutes on this thing and the number of issues seem to outweigh its use. Can anyone provide best practices, sample code, etc. for this feature?
Funny that the description of this forum is "It's good to separate content from layout", when VFE specifically merges the two...
Thanks in advance,
-John