[Yanel-dev] xinclude

Michael Wechner michael.wechner at wyona.com
Fri Dec 23 13:38:14 CET 2011


Dear Balz

Am 23.12.11 10:16, schrieb basZero:
> Dear Michael,
> thanks for your reply.
> The scenario I was laying out is as follows:
> you have a page (served resource A) using the global.xsl. Resource A 
> is configured to produce text/html at the end (mime property in yanel-rc).
>
> In any XSL, executed in the context of resource A, I am able to 
> produce this kind of HTML:
> <scripttype="text/javascript"><!--
> google_ad_client ="ca-pub-4234093452213266";
> /* Right Sidebar */
> google_ad_slot ="1819825771";
> google_ad_width =160;
> google_ad_height =600;
> //-->
> </script>
>
> Every new line and every single character must exactly look like this 
> in the resulting HTML (that's the rule given by Google AdSense, can't 
> change that).
>
> But when I want to produce that HTML in a resource configured with 
> mimetype xhtml (like the header or the sidebar), It can not be 
> rendered like that (because it's not XHTML)...

I think the above script snippet is well-formed (at least when using 
xmllint).

Maybe you have to add <?xml version="1.0"?> and include it as 
application/xml, whereas the page including the above
then can be serialized as text/html
>
>
> So this is how I came to the question, why can I not run the Header 
> and Sidebar resource with mime type text/html :)
>
> However, I can also embed the code in an XSL that is used by a 
> text/html resource, so It will work, I just wondered, whether somebody 
> knows...
>
> If you have an idea, let me know.
>
> Merry Christmas to you Michael and all others listening on this list!

Very merry christmas to you and everybody else as well :-)

Michael
>
> Gruess
> Balz
>
> On Fri, Dec 23, 2011 at 5:58 AM, Michael Wechner 
> <michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>
>     Am 22.12.11 16:49, schrieb basZero:
>>     dear all,
>>
>>     I have a general question:
>>
>>     usually the menu gets included via xinclude from the global XSL:
>>
>>     e.g.:
>>
>>     <xi:include
>>     href="yanelresource:/de/header.yanel?path={$yanel.path}"/>
>>
>>
>>     it seems that the resource serving the content for that included
>>     content must deliver content in mime type "application/xhtml+xml".
>>     when changing it into "text/html" it throws many exceptions in
>>     the log.
>
>     yes, because it's not considered to be well-formed
>
>>
>>     does anybody have used includes with "text/html" content?
>
>     why do you want to include something inside XML/XHTML, which might
>     not be XML/XHTML?
>
>     Or otherwise you might want to consider to use CDATA, but I guess
>     then you would have to use something
>     different than xi:include, because I would assume that XInclude
>     would always require some well-formed XML/XHTML per definition.
>
>     HTH
>
>     Michael
>>
>>     Thanks
>>     cheers
>>     Balz
>>
>>
>
>
>     --
>     Yanel-development mailing list Yanel-development at wyona.com
>     <mailto:Yanel-development at wyona.com>
>     http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20111223/510743e6/attachment.html>


More information about the Yanel-development mailing list