Forum OpenACS Development: Re: Beta Emacs OACS module available

Collapse
Posted by Talli Somekh on
Andrei said: "It will probably be a bit tough, and may in fact require some rework in Templating and possibly other core parts of OpenACS to make ADPs into a valid XML. In particular, I am not sure how to make @vars@ accpetible as attributes in if tags -- I don't think XML allows '@' in the name of an attribute."

I wonder if it wouldn't be worthwhile, though? The reason I ask is not to achieve buzzword compliance but in order to plug the OATS into something like Dreamweaver as an extension. (In my very perfuctory glance, it seems that Dreamweaver extensions are XML files of some sort.)

Are there any other potential gains in fulfilling Andrei's idea that would outweigh the pain of reworking the system?

talli

Collapse
Posted by Andrei Popov on
I don't think it would require a rework as such -- what I am saying is that ADPs are not valid XML files, that is all.  There might be a way (or there may be none) to shut off nXML's validation of @@'s.  If there is no way -- well, so be it.

The only benefit I see, is that if your template validates, then there is a greater chance that generated page would validate as well.  Otherwise -- see my old post (https://openacs.org/forums/message-view?message_id=118033) about how compliant OACS is (was? will check) with even basic requirements (like quoting of attribute values and absence of open-ended tags).

Collapse
Posted by Andrei Popov on

As included in openacs-5.0.0 tarball:

  • Total number of ADPs: 323
  • Unquotes attribute values: 127 files, 452 lines
  • <[BH]R> instead of <[bh]r />: 62 files, 134 lines
  • FONT tag use: 35 files, 63 lines
  • Capitalised tags: 2 files; yay! let's list them hereinbelow:
    • ./acs-admin/www/users/index.adp
    • ./acs-subsite/www/shared/iso-codes-no-exist.adp

Note, that this is only in core packages.

Collapse
Posted by Jeff Davis on
One really big advantage to moving to .adp's that validate as xml is that there are a number of bugs that are not diagnosed very well when the adp is malformed (eg an unclosed multiple tag produces a not very intuitive error). Having the adp's validate would make automated testing for that sort of error straightforward.

On the other hand, dreamweaver will work just fine even if they are not well formed xml (although maybe this has changed since version 4 which was the last time I worked with designers who used it).

I think it would be pretty straightforward to fix the most common things (singleton tags, attribute quoting, and case would be most of it), but <if> tags and the nesting of adp tags inside html tags (like on the body tag in the master template) would be problematic.

quoting everything and fixing case can be done w/o discussion, but we would have to have a TIP for the other required changes and while I would vote yes for such a change I am not sure other people would.