Jump to content

better handling of : in array keys.


Recommended Posts

this is just a friendly asking.
IPB freaks out, by any array key with : in it.
Now how common is that? depends on whether you work heavily with xml files.
As it is, im having to strip the array keys to be able to loop properly, and retreiving an array of attributes from a source tag( think itunes:creator) makes the xml kernel explode.
need better handling of this in this library quite specifically when somebodies got some free time to re-arrange a kernel with.

Link to comment
Share on other sites


As long as the XML validates, then wouldn't this be a bug?



Maybe? it goes further than XML's TBH... or the specific item i am messing with.
example.


$array = array();

$array['my:key'] = array('A', 'B', 'C');

ipsRegistry->getClass('output')->getTemplate('somegroup')->someTemplate($array);


try to loop through that array with my:key.

Link to comment
Share on other sites

the issue im having specifically as a note is reading this tag... this is raw-dump, but you get the gist... I'm not seeing any capability for reading this structure in the xml kernel:

) ) [1] => Array ( [@attributes] => Array ( [width] => 144 [height] => 81 [url] => ) ) )


[media:thumbnail] => Array

										(

[0] => Array

 (

 [@attributes] => Array

 (

[width] => 66

 [height] => 49

    [url] => 		


this is within the "record" level.... seeing nothing that will iterate through that in the xml kernel.

Link to comment
Share on other sites


You didn't answer my question above, if this is valid XML then why start a feedback topic about it instead of reporting it as a bug? If it's valid XML, and the XML class in IP.Board can't handle it, that's a bug.



umm, sure, but I'm not certain it was ever designed to read that far into the xml like that in the first place? the more legitimate bug would be the array keys itself in the templates in post 4... but sure, I'll report what may be a feature request.
Link to comment
Share on other sites

Is the issue reading the XML, or handling it in the template.

Or are you not finding a way to read nested into the arrays the XML library creates? If that's the case, you have to pass parent element name to the fetchElements() method to drill down properly.

Link to comment
Share on other sites


Is the issue reading the XML, or handling it in the template.



Or are you not finding a way to read nested into the arrays the XML library creates? If that's the case, you have to pass parent element name to the fetchElements() method to drill down properly.



reading the xml ill likely sort, I'm already drilling down into channels and item here frankly... the feedback topic was made as a result of specifically the : in templates... stripping them creates a difference between the raw xml they would get if is not ATOM or RSS, and the data being handed when it is, leaving them causes issues when looping using those keys.
Link to comment
Share on other sites


Is the issue reading the XML, or handling it in the template.



Or are you not finding a way to read nested into the arrays the XML library creates? If that's the case, you have to pass parent element name to the fetchElements() method to drill down properly.



apparently fetchElements IS an issue.. try to fetchElements on a tag with a : ... it fails, fetchElementsFromRecord, fetchItem, or fetchAttributesAsArray return no results, it *silently* fails.... NOW I'll report a bug on it... cause that is one. :D
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...