Closed ajmedeio closed 1 year ago
Ok seems like a reasonable change. I will just probably call it 'linkbase_uri' instead of 'linkbase_url'. I have made this distinction before to differentiate between real URL's and ones that can be both a URL and a path.
Beautiful, you're a pleasure to work with.
Cheers!
@manusimidt I need the Linkbase class to have a reference to the source file it was parsed from. This enables me to link between my own parsed Linkbase and the libraries' parsed Linkbases.
The work to implement this feature:
This requires an extra property added to the Linkbase constructor with default value of None (for backwards compatibility):
src
And finally, notice the last argument of the return statement here:
src
If you see an alternative approach please don't hesitate to clarify.
Explanation of change
The result of this change is linkbases have an additional property named linkbase_url which is an href if parsed from the internet or an absolute path on the filesystem if parsed from a local file.