Re: [xslt] uri escaping in html output, redux



Daniel Veillard writes:

> Not 100% clear to me, the whole URI handling framework is
> messy it's not just libxml2 or libxslt not being compliant
> to such and such specification.  This could be fixed if
> libxml2 behaviour is not changed.

Yes, URI handling is difficult.  Everybody, who tried, knows
that.

> > Stylesheet author only knows when and what part of URI to
> > escape.
>
>  and so far nobody did it right because they have no tools
>  for it, there is no way to put knowledge of all URI
>  schemas in the tools library to know what should be
>  escaped and where, ...

Exactly. I again agree (starting from "there is no way").

>  ... nor XSLT-1.0 provide any URI parsing API facilities
>  making generic handling by stylesheet author
>  impossible. if the author build the URI with knowledge of
>  the given protocol, then he may be able to do the right
>  thing, but in general it is not the case, ...

I do not see what you mean here by "in general it is not the
case"?  Do you mean stylesheet authors do not generally know
the URI scheme and particular URI components of which they
are building a URI?

My understanding is that if anybody can know a particular
URI's scheme, it will be stylesheet author first of all.  If
anybody can construct a correct URI, it will be the
stylesheet author.  If stylesheet author can't do that,
nobody can.


Finally, the major sign of things broken, I belive, is that
currently with libxslt there is no way to generate a valid
HTML link with a certain valid URI.  

That probably means there's something seriously wrong.


> it is impossible in general for example to know in advance
> at the stylesheet level the base URI of the generated
> pages, so you don't even know when writing the stylesheet
> if for example the HTML resources produced will be
> accessed with a file:// or a http:// URL, and you
> shouldn't know it.


Ivan Kurmanov
http://ahinea.com/en/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]