This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21072 - Parsing examples
Summary: Parsing examples
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+urlspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-21 15:08 UTC by Marcos Caceres
Modified: 2015-08-19 17:09 UTC (History)
4 users (show)

See Also:


Attachments

Description Marcos Caceres 2013-02-21 15:08:55 UTC
in section 5.2 Parsing, the spec is currently lacking in examples. This section is important for specification authors who rely on this algorithm. Would be nice to see what the result of parsing various strings is.

given the string "  ?abc=123#123   ", what comes out the other end of the parsing algorithm?

given the string "?hello=is this ok?", what comes out the other end of the parsing algorithm?

given the string "?query?#fragment#", what comes out the other end of the parsing algorithm?

What can cause a URL to be invalid?

Some examples of how to invoke the algorithm from another spec would be nice, as well as when it is appropriate to use each of the optional arguments. Like, when should one use a state override? Should one use one when parsing a relative URL? 

Hope that helps!
Comment 1 Anne 2014-05-22 10:38:26 UTC
So the example strings you give would all result in failure. Did you mean to include a base URL?

I agree that we need this. Any thoughts on how to include this neatly given the current flow of the text?
Comment 2 Sam Ruby 2014-11-05 21:30:02 UTC
Does http://intertwingly.net/projects/pegurl/liveview.html address this issue?
Comment 3 Marcos Caceres 2015-08-19 17:09:24 UTC
(In reply to Sam Ruby from comment #2)
> Does http://intertwingly.net/projects/pegurl/liveview.html address this
> issue?

Yep.