Menu

Base URL of TERM

2012-09-10
2012-09-12
  • Hannes Morgenstern

    Haloo jStyle!

    Today I tested jStyle to check if I will use it in our project. I need to find
    all external Files that are included in a HTML Page. For analyzing CSS Data I
    am verry content with jStyle. It even recursively imports "@import"
    statements!

    The problem I have is, that I cannot find the URL of the File that is
    referenced in the CSS.

    I use

    CSSFactory.getUsedStyles(...)
    

    to parse the HTML Dome and then I traverse all

    RuleBlocks
    

    ,

    Rules
    

    and

    Terms
    

    until I find some

    TermURI
    

    objects, wicht value is the information I am looking for.

    To access the File that is referenced by that

    Term
    

    , I would need the base URL of the

    CSSInputStream
    

    , this

    Term
    

    was loaded from.

    But I have not found any way how to access that information in the

    TermImpl
    

    or

    TermURIImpl
    

    classes.

    How can I find this information?

    This would also be some nice functionality for the

    TermURI
    

    Interface. Something like

    getBaseURL()
    

    .

    Thankyou for this perfect Tool.

    Regards,

    Hannes

     
  • Radek Burget

    Radek Burget - 2012-09-11

    Hello Hannes,

    actually, the base URL is already implemented in the trunk version available
    in the svn repository (there is a getBase() method in TermURI). I am planning
    to release a new stable version including this in a few days. Does this solve
    your problem or is ther anything more required?

    Radek

     
  • Hannes Morgenstern

    perfect I am waiting for the release. I am already keen to look at the code how you did that.
    Thank you, Hannes

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.