Am Montag, 25. Juli 2016 21:32:07 UTC+2 schrieb sri:
>
> The parser I used to use before (HMTL::HTML5::Parser) does provide a 
>> line-number function for each element. This is enough for me to retain the 
>> sequence of nodes, the absolute position is not important.
>>
>
> What if the DOM tree changes, like a newline gets added somewhere above, 
> and the line number changes as well? Are there any specs that cover this 
> topic?
>
>
>
Hello sri,

My application is kind of a verification service tailored to my companies 
needs. It runs daily as a cron job to check for changes. So changes are 
fine... It's purpose is to point out shortcomings and errors in the HTML 
source, like "The alt tag in file foo.html, at line 13, column 14 is 
empty." or "The filename in 'img' tag in file bar.html, line 23, column 42 
does not correspond to company standards" and so on.

Of course errors are fixed someplace else (in a database), but having 
filename + line/column number helps the maintainer of the website to 
identify the correct item in question. The question why I am checking the 
HTML output and not the database input is certainly valid and can only be 
explained by historical reasons, it's just something I have to live with 
for the moment.

No there is no standard for this topic, AFAICS.

It's no big deal and I just asked because I found the source_line() 
function in HTML::HTML5::Parser.

Thanks for Mojolicious in any case, it's a very nice tool which I use a lot 
:)

Cheers,
Ekki

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to