|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
I have a serialized XML document in an associative array using
XML_Serializer. Due to the use of namespaces, many of the elements in the document use a colon ( within the name. Since the names arestored as the array key, this causes problems with smarty. How do I reference a variable such as this within smarty: $array['xlink:href'] ? When I attempt to use the correct syntax {$array.xlink:href} I get the following error: syntax error: unrecognized tag Any ideas? Thanks Andrew |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
http://www.phpinsider.com/smarty-for...pic.php?t=6227
same goes for colons. Andrew Nagy wrote: > I have a serialized XML document in an associative array using > XML_Serializer. Due to the use of namespaces, many of the elements in > the document use a colon ( within the name. Since the names are> stored as the array key, this causes problems with smarty. > > How do I reference a variable such as this within smarty: > $array['xlink:href'] ? > > When I attempt to use the correct syntax {$array.xlink:href} I get the > following error: > syntax error: unrecognized tag > > Any ideas? > > Thanks > Andrew > |
|
|
|
#3 (permalink) |
|
Messages: n/a
Hébergeur: |
Maybe the documentation should be changed to indicate these facts ??
pete Monte Ohrt wrote: > http://www.phpinsider.com/smarty-for...pic.php?t=6227 > > same goes for colons. > > Andrew Nagy wrote: > >> I have a serialized XML document in an associative array using >> XML_Serializer. Due to the use of namespaces, many of the elements in >> the document use a colon ( within the name. Since the names are>> stored as the array key, this causes problems with smarty. >> >> How do I reference a variable such as this within smarty: >> $array['xlink:href'] ? >> >> When I attempt to use the correct syntax {$array.xlink:href} I get the >> following error: >> syntax error: unrecognized tag >> >> Any ideas? >> >> Thanks >> Andrew >> |
|
|
|
#4 (permalink) |
|
Messages: n/a
Hébergeur: |
--- Pedro <daffodil@daffodil.uk.com> wrote:
> Maybe the documentation should be changed to indicate these facts ?? Why? Recognized variable syntax is already described succinctly: http://smarty.php.net/manual/en/lang....variables.php I see no need to start listing all the things that aren't legal in addition to saying what *is* legal. The real problem is that no matter what we put in the manual, people still won't read it. ![]() boots > pete > > > Monte Ohrt wrote: > > http://www.phpinsider.com/smarty-for...pic.php?t=6227 > > > > same goes for colons. > > > > Andrew Nagy wrote: > > > >> I have a serialized XML document in an associative array using > >> XML_Serializer. Due to the use of namespaces, many of the elements in > >> the document use a colon ( within the name. Since the names are> >> stored as the array key, this causes problems with smarty. > >> > >> How do I reference a variable such as this within smarty: > >> $array['xlink:href'] ? > >> > >> When I attempt to use the correct syntax {$array.xlink:href} I get the > >> following error: > >> syntax error: unrecognized tag > >> > >> Any ideas? > >> > >> Thanks > >> Andrew > >> __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
|
|
#5 (permalink) |
|
Messages: n/a
Hébergeur: |
"boots" <jayboots@yahoo.com> wrote in message
news:20051214165109.42825.qmail@web50811.mail.yaho o.com... > --- Pedro <daffodil@daffodil.uk.com> wrote: > > Maybe the documentation should be changed to indicate these facts ?? > > Why? Recognized variable syntax is already described succinctly: > http://smarty.php.net/manual/en/lang....variables.php > > I see no need to start listing all the things that aren't legal in addition to > saying what *is* legal. The real problem is that no matter what we put in the > manual, people still won't read it. ![]() > I read it all the time. : ) Robert |
|
![]() |
| Outils de la discussion | |
|
|