trackback::get_ping_url (public)

 trackback::get_ping_url [ -data data ] [ -link link ]

Defined in packages/trackback/tcl/trackback-procs.tcl

searches for trackback information

Switches:
-data (optional)
html content to search
-link (optional)
URL of item linked to, used to find the correct trackback URL if more than one trackback RDF section is in data
Returns:
ping_url URL of trackback link for the content provided or empty string if no trackabck info is found
Author:
Dave Bauer dave@thedesignexperience.org
Created:
2003-04-14

Partial Call Graph (max 5 caller/called nodes):
%3 trackback::auto_ping trackback::auto_ping (public) trackback::get_ping_url trackback::get_ping_url trackback::auto_ping->trackback::get_ping_url

Testcases:
No testcase defined.
Source code:
    set ping_url ""
    set method ""
    foreach rdf_data [regexp -all -inline {<rdf:Description.*?/>} $data] {
    # find dc:identifier tag and compare to link passed in
    # if it matches, look for trackback:ping or fall back to
        # about

    ns_log debug " trackback::get_ping_url rdf_data $rdf_data"
    if {[regexp {trackback:ping=\"([^"]+)\"} $rdf_data extra result]} {
           set ping_url $result
           set method POST
        } elseif {[regexp {about=\"([^"]+)\"} $rdf_data extra result]} {
           set ping_url $result
       set method GET

        } else {
        set ping_url "none"
        set method "none"
    }

    }
    return [list $ping_url $method]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/trackback/tcl/trackback-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: