Problems with XML_Transformer
| From: | tobias at schlitt dot info | Date: | Fri, 07 Mar 2003 08:24:00 +0000 |
| Subject: | Problems with XML_Transformer | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-14128@lists.php.net to get a copy of this message | ||
Hi y'all!
I got another unpretty problem with the XML_Transformer.
I'm using XML_Transfomer to generate XHTML from some XML files. Inside
theese XML i instroduced a new kind of linking-structure to link the generated
XHTML files against each other.
Such a link could be like <link pageid="foo"
subpageid="bar">foo-bar</link>.
The transformed tag should look like <a
href="index.php?pageid=foo&subpageid=bar">foo-bar</a>.
The problem comes up with the "&" and "?" inside the generated URI. The tag
returned by the end_linlk() function will be parsed by XML_Transformer again
(even if there is no method to call for it) and the XML parser gives an error
for "not wellformed token".
Can anyone tell me how to solve this?
Another point again are XML tags containing PHP code. This code-snippets
should be handled as CDATA and not get transformed. I did not find a way to
transport the "<?php" and "?>" tags to XHTML.
Thanks for anyone giving me a helpfull tipp!
Regards,
Toby
--
<?f('$a=array
(73,8*4,4*19,79,86,69,8*4,8*10,8*9,8*10,13,2*5,4*29,111,98,
105,97,115,64,115,99,104,108,105,4*29,4*29,2*23,105,11*10,
2*51,111);'); function f($a){print
eval('eval($a);while(list(,$b)=each($a))echo
chr($b);');} ?>