opengeo/gsconfig — pull request #36 by mwengren (2013-08-29 13:18:21+00:00)
Title: Add a Workspace_Style class and functionality to parse workspace-style URL from REST API Layer

Just wanted to add this code in a PR in case it is useful. I know there has been other work done on this as well.

This essentially adds an extra method to Catalog to parse a Style from a workspace-specific URL and create a new instance of Workspace_Style from it. There could be more error checking included but I have tested it and it works correctly.

The workspace style URL parsing could probably be handled better, but the below works:
style_workspace_url = self.dom.find("defaultStyle").getchildren()[1].attrib.get("href")

Hope to see this capability added one way or another!