[Yanel-dev] xinclude

basZero baszero at gmail.com
Fri Dec 23 10:16:27 CET 2011


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:
<script type="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)...


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!

Gruess
Balz

On Fri, Dec 23, 2011 at 5:58 AM, Michael Wechner
<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
> 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/2234f945/attachment-0001.html>


More information about the Yanel-development mailing list