Escaping URI attributes in html method

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Escaping URI attributes in html method

Colin Paul Adams
In Saxon 8.5.1, the code in HTMLEmitter.java for escaping URI-valued
attributes has been commented out.
Yet the September 2005 draft for the serializer still mandates this.
So why?
--
Colin Adams
Preston Lancashire


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: Escaping URI attributes in html method

Michael Kay
The code has been moved to a new class, HTMLURIEscaper. This enables URI
escaping to be done before character map expansion and Unicode
normalization, reflecting the order defined in section 4 of the
serialization spec. You can see the way the serialization pipeline is
assembled in class ResultWrapper.

Michael Kay
Saxonica

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Colin Paul Adams
> Sent: 07 October 2005 10:16
> To: [hidden email]
> Subject: [saxon] Escaping URI attributes in html method
>
> In Saxon 8.5.1, the code in HTMLEmitter.java for escaping URI-valued
> attributes has been commented out.
> Yet the September 2005 draft for the serializer still mandates this.
> So why?
> --
> Colin Adams
> Preston Lancashire
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads,
> discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: Escaping URI attributes in html method

Michael Kay
In reply to this post by Colin Paul Adams
Looking at the code in response to your comment, I've just spotted that the
HTML pipeline currently does unicode normalization before character map
expansion, which is wrong: the XHTML pipeline gets it right. You have to
work quite hard to find a case where it matters...

Michael Kay
Saxonica

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Colin Paul Adams
> Sent: 07 October 2005 10:16
> To: [hidden email]
> Subject: [saxon] Escaping URI attributes in html method
>
> In Saxon 8.5.1, the code in HTMLEmitter.java for escaping URI-valued
> attributes has been commented out.
> Yet the September 2005 draft for the serializer still mandates this.
> So why?
> --
> Colin Adams
> Preston Lancashire
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads,
> discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: Escaping URI attributes in html method

Colin Paul Adams
In reply to this post by Michael Kay
>>>>> "Michael" == Michael Kay <[hidden email]> writes:

    Michael> The code has been moved to a new class,
    Michael> HTMLURIEscaper. This enables URI escaping to be done
    Michael> before character map expansion and Unicode normalization,
    Michael> reflecting the order defined in section 4 of the
    Michael> serialization spec.

Ah, I see.
Note that the list of attributes to be escaped does not correspond to
Appendix C in the serialization draft.
--
Colin Adams
Preston Lancashire


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: Escaping URI attributes in html method

Michael Kay
> Note that the list of attributes to be escaped does not correspond to
> Appendix C in the serialization draft.

Thanks, yes: this list is new, I think, in the September draft. There was an
issue that the term "URI attribute" was undefined and we decided to define
it by enumerating them. The list hasn't had much review.

There appear to be three differences:

* the spec includes object/@archive, which is a UriList rather than a URI

* the spec includes @datasrc. I'm surprised by this one because I can't find
it in an official spec. I'll ask some questions but include it anyway.

* I include a/@name, on the basis of the note in Appendix B.2.1 of the HTML
spec. I think this is an omission from the spec and will raise it as an
issue. If you escape a same-document URI reference and don't escape the
@name that it refers to, the browser doesn't match them up (or didn't, last
time I tried).

Michael Kay
Saxonica





-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: Escaping URI attributes in html method

David Carlisle

  * the spec includes @datasrc. I'm surprised by this one because I can't find
  it in an official spec. I'll ask some questions but include it anyway.




http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/datasrc.asp


which says:


Standards Information

    There is no public standard that applies to this property.


Hmmmm:-)


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: Escaping URI attributes in html method

Colin Paul Adams
In reply to this post by Michael Kay
>>>>> "Michael" == Michael Kay <[hidden email]> writes:

    Michael> There appear to be three differences:
<snip>

Yes - that's what I noticed.
--
Colin Adams
Preston Lancashire


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help