Ticket #890 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

Make element inclusion more XML-friendly

Reported by: bergie Assigned to: bergie
Priority: major Milestone: 9.03 Vinland
Component: MidCOM core Version: 9.03 Vinland
Keywords: Cc:

Description (Last modified by bergie)

Currently Vinland uses the <(elementname)> syntax for element inclusion. However, this comes from legacy Midgard and makes templates where it is used not valid XML.

Some ideas:

Change History

02/28/09 19:29:00 changed by bergie

  • description changed.

02/28/09 19:32:32 changed by bergie

Note: we may have non-TAL or non-XML templates too. They need to have their own syntax?

03/20/09 18:12:18 changed by bergie

The way to handle this inside TAL:

<span metal:use-macro="elementname" />

Then we create a midcom_helper_tal class that subclasses PHPTAL and overrides the executeMacro method with something that calls $_MIDCOM->templating->get_element('elementname').

03/20/09 21:37:39 changed by bergie

  • status changed from new to assigned.

After some investigation of TAL, it appears we cannot hook to METAL the way we'd need to.

So, changing the syntax to <mgd:include>elementname</mgd:include> to replace <(elementname)>

03/20/09 21:40:34 changed by bergie

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [21340]) Use a more XML-compatible <mgd:include /> syntax for element inclusion, fixes #890

03/20/09 21:49:39 changed by bergie

(In [21341]) Add namespaces for validation purposes, refs #890