Hi
When using SimpleTaglib you can output an XML fragment, using the
'struct' result attribute. However I've found that this only works
inside an <xsp:content> tag or inside a non-xsp tag. This means the
following doesn't output the XSP fragment generated by 'sub mystuct :
struct {...}' :
<myns:parent_tag>
<myns:mystruct/>
</myns:parent_tag>
You get the XML fragment output have to put:
<myns:parent_tag>
<xsp:content>
<myns:mystruct/>
</xsp:content>
</myns:parent_tag>
Or:
<myns:parent_tag>
<somenonxsptag>
<myns:mystruct/>
</somenonxsptag>
</myns:parent_tag>
I can see it is the code (attached below) in SimpleTaglib's 'sub
end_element' that is the cause of this. My question is why? Why does
simple taglib not allow:
<myns:parent_tag>
<myns:mystruct/>
</myns:parent_tag>
To output the XML fragment? Or have I misunderstood something? If I've
understood correctly I wonder if there is a valid reason here to add
functionality to SimpleTaglib to output XML fragments, whatever the
context.
Any help and comments on this would be of interest to me.
Adam
Snippet from SimpleTaglib.pm
___________________________________________________________________
if
(Apache::AxKit::Language::XSP::is_xsp_namespace($element->{'Parent'}->{'
NamespaceURI'})) {
if (!$e->manage_text() || $element->{'Parent'}->{'Name'} =~
/^(.*:)?content$/) {
$e->append_to_script('Apache::AxKit::Language::XSP::SimpleTaglib::xmlize
($document,$parent,[['.makeSingleQuoted($nsprefix).'=>'.makeSingleQuoted
($nsuri).']],@_res); ');
} else {
$e->append_to_script('eval{if (wantarray) { @_res; } else {
join("",@_res); }}');
}
} else {
$e->append_to_script('Apache::AxKit::Language::XSP::SimpleTaglib::xmlize
($document,$parent,[['.makeSingleQuoted($nsprefix).'=>'.makeSingleQuoted
($nsuri).']],@_res); ');
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]