*/
public IResourceStream getMarkupResourceStream(final MarkupContainer container,
Class<?> containerClass)
{
// Get locator to search for the resource
final IResourceStreamLocator locator = Application.get()
.getResourceSettings()
.getResourceStreamLocator();
String style = container.getStyle();
String variation = container.getVariation();
Locale locale = container.getLocale();
MarkupType markupType = container.getMarkupType();
String ext = (markupType != null ? markupType.getExtension() : null);
// Markup is associated with the containers class. Walk up the class
// hierarchy up to MarkupContainer to find the containers markup
// resource.
while (containerClass != MarkupContainer.class)
{
String path = containerClass.getName().replace('.', '/');
IResourceStream resourceStream = locator.locate(container.getClass(), path, style,
variation, locale, ext, false);
// Did we find it already?
if (resourceStream != null)
{