Open Power Template 2.x family
PLEASE PROVIDE THE TEMPLATES AND/OR PHP CODE IN THE TASK DESCRIPTION (Not URL-s to them). THAT ALLOWS US TO REPRODUCE THE PROBLEM! OTHERWISE WE ARE NOT ABLE TO HELP YOU!
Remember to hide all the security-related pieces of code from the task description, like passwords, server paths etc. for your own safety. Once we close the task, we cannot edit it anymore!
PLEASE PROVIDE THE TEMPLATES AND/OR PHP CODE IN THE TASK DESCRIPTION (Not URL-s to them). THAT ALLOWS US TO REPRODUCE THE PROBLEM! OTHERWISE WE ARE NOT ABLE TO HELP YOU!
Remember to hide all the security-related pieces of code from the task description, like passwords, server paths etc. for your own safety. Once we close the task, we cannot edit it anymore!
FS#97 - parse: and XML-Namespaces
Attached to Project:
Open Power Template
Opened by Skruppy (Skrupellos) - Friday, 17 July 2009, 12:40 GMT-7
Last edited by Zyx (Zyx) - Sunday, 19 July 2009, 03:21 GMT-7
Opened by Skruppy (Skrupellos) - Friday, 17 July 2009, 12:40 GMT-7
Last edited by Zyx (Zyx) - Sunday, 19 July 2009, 03:21 GMT-7
|
DetailsDESCRIPTION:
It's allowed to add only one namespace to an attribute of an tag. So if we want a namespace and the parse: it's impossible, but the compiler doesn't complain about it and generates a buggy output. EXAMPLE: --- template --- <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <opt:root> <p parse:xml:lang="$lang">Witaj</p> <!-- OK, translate.google.com helped me :) --> </opt:root> --- END template --- --- script --- $view->lang = 'pl'; --- END script --- OUTPUT: --- output --- <p xml="pl">Witaj</p> --- END output --- EXPECTED: Expection: Opt_XmlToManyNamespaces_Exception And a hint in the documentation how to solve this problem, see "workaround". WORKAROUND: --- template --- <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <opt:root> <p parse:xml:lang="$lang"> <opt:attribute name="xml:lang" value="$lang" /> Witaj </p> </opt:root> --- END template --- |
This task depends upon
Closed by Zyx (Zyx)
Sunday, 19 July 2009, 03:21 GMT-7
Reason for closing: Fixed
Additional comments about closing: Fixed/implemented in rev. 156
Sunday, 19 July 2009, 03:21 GMT-7
Reason for closing: Fixed
Additional comments about closing: Fixed/implemented in rev. 156
- Since OPT 2.1.0, the "dynamic" attributes will not use the namespaces anymore to indicate this fact. It will be left for the backward compatibility, but disabled by default - see #76 for details.
- The parser will return the exception since 2.0.1
- The `opt:attribute` instruction will be given a new attribute: "namespace" since 2.0.1 (the changes will be available on SVN earlier).