[Portfolio] 503 for DTD request in templated portfolios that import other templates

Noah Botimer botimer at umich.edu
Fri Nov 20 15:58:36 PST 2009


In general, the Content Hosting URI resolver should be in place when  
these XSLs execute. That means that an import on something like '/ 
group/PortfolioAdmin/...xsl' should be valid. This also insulates  
your XSL from instance/hostname changes and so on. You will want to  
make sure that anything included/imported is public in Resources.

The tricky bit here is that XSL includes and so on that are not fully  
qualified URLs are not evaluated the same as they would by a browser.  
They are resolved locally, which, if the CHS glue isn't in place,  
will be somewhere deep in the app server (essentially useless). If we  
find that this is the case anywhere, we should fix it.

Note that this means '/access/content/group/PortfolioAdmin' is  
incorrect for things like include/import. It is, however, correct for  
referencing accessible items that the browser would hit (script,  
images, or stylesheets). There is a different construction for  
"additional materials" attached to a template, where you would  
typically pass the path from the XML to sakaifn:getReferenceUrl. (You  
can also pass your items like script URLs to getReferenceUrl if you  
remove /access/content.)

I cannot speak to the http/https behavior or the DTD 503s aside from  
that we should make sure that the local catalog is registered  
everywhere as in http://jira.sakaiproject.org/browse/SAK-16536. Along  
with local, internal references to your supplemental materials, this  
should make sure that your server isn't attempting external requests  
for what it needs.

Thanks,
-Noah

On Nov 20, 2009, at 4:16 PM, hongbo zhang wrote:

> I just tested it with the localhost 2.6.0 instance.
>
>
>
> If I write
>
>
>
> <xsl:include href="http://localhost:8080/access/content/group/ 
> PortfolioAdmin/authoring/themeEPATVT/xsl/editingpagehelp.xsl"/>
>
>
>
> It does not work. It complains the stylesheet can not be complied.
>
>
>
> However if I use
>
>
>
> <xsl:include href="https://scholar.vt.edu/access/content/group/ 
> PortfolioAdmin/authoring/themeEPATVT/xsl/editingpagehelp.xsl"/>
>
>
>
> It works.
>
>
>
> I attached the worked screen shot as well as the template file for  
> the 2.6.0 test. The texts on the front page comes from a template  
> in another xsl file.
>
>
>
> However, interestingly, both localhost and permanent URL methods  
> work for 2.5.3 instance.
>
>
>
> I guess, the permanent URL is important for 2.6. The URL should not  
> be in the localhost. It should be a good workable URL. Many times,  
> we use localhost for development, which might give some trouble.
>
>
>
> Just a thought.
>
>
>
> Hongbo
>
>
>
>
>
>
>
>
>
> From: sean at keesler.org [mailto:sean at keesler.org] On Behalf Of Sean  
> Keesler
> Sent: Friday, November 20, 2009 12:35 PM
> To: Maurer, Christopher Wayne
> Cc: Ackerman, Erica; hongbo zhang; osp
> Subject: Re: [Portfolio] 503 for DTD request in templated  
> portfolios that import other templates
>
>
>
> I'm pretty sure it's importing the 2nd file...if I change the url,  
> I get an error that it can't find the file to import...
> My 2nd file is dirt simple...a passthrough stylesheet...just to test.
>
> Sean Keesler
> 130 Academy Street
> Manlius, New York 13104 USA
> 315-663-7756
> sean.keesler at threecanoes.com
>
>
> On Fri, Nov 20, 2009 at 11:56 AM, Maurer, Christopher Wayne  
> <chmaurer at iupui.edu> wrote:
>
> The only difference I see is that Sean's import uses a full url to  
> the xsl file while Erica's is just a path to a content resource.
>
>
>
> Not sure if that makes a difference or not, but worth noting!
>
>
>
> Chris
>
>
>
> On Nov 20, 2009, at 11:34 AM, Ackerman, Erica wrote:
>
>
>
> Sean,
>
>
>
> We use xsl:import in the Page Composer, and it works in 2.6 and 2.5  
> both.
>
>
>
> For example:
>
>
>
> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml"  
> xmlns:sakaifn="org.sakaiproject.metaobj.utils.xml.XsltFunctions"  
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:xhtml="http:// 
> www.w3.org/1999/xhtml" xmlns:osp="http://www.osportfolio.org/OspML"  
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>     <xsl:output method="html" doctype-system="http://www.w3.org/TR/ 
> xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD  
> XHTML 1.0 Transitional//EN"/>
>     <xsl:import href="/group/PortfolioAdmin/authoring/xsl/ 
> formCreate-wysiwyg.xsl" />
>
> Could there be something wrong with the imported file?
>
>
>
> Erica
>
>
>
> From: portfolio-bounces at collab.sakaiproject.org [mailto:portfolio- 
> bounces at collab.sakaiproject.org] On Behalf Of Sean Keesler
> Sent: Friday, November 20, 2009 10:33 AM
> To: hongbo zhang
> Cc: osp
> Subject: Re: [Portfolio] 503 for DTD request in templated  
> portfolios that import other templates
>
>
>
> I wonder if this is a 2.6-only issue.
> Have you tried your template in a 2.6 instance?
>
> Sean Keesler
> 130 Academy Street
> Manlius, New York 13104 USA
> 315-663-7756
> sean.keesler at threecanoes.com
>
> On Thu, Nov 19, 2009 at 3:41 PM, hongbo zhang <hbzhang at vt.edu> wrote:
>
> I just tried using xsl:include. It works great.
>
>
>
> I attached the sample file.
>
>
>
> This is the template xsl file used in single form template.  I  
> include another xsl file, which has several templates. I just try  
> to call it           <xsl:call-template name="Tab1instruction"></ 
> xsl:call-template> at line 743.
>
>
>
> It seems it works fine for me. We run 2.5.4 instance.
>
>
>
> Hongbo
>
>
>
>
>
> From: portfolio-bounces at collab.sakaiproject.org [mailto:portfolio- 
> bounces at collab.sakaiproject.org] On Behalf Of Sean Keesler
> Sent: Thursday, November 19, 2009 3:10 PM
> To: osp
> Subject: [Portfolio] 503 for DTD request in templated portfolios  
> that import other templates
>
>
>
> Has anyone developed a portfolio template using an xsl file that  
> imports other xsl files?
> Like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
> version="1.0">
>
> <!-- this needs to be any publicly accessible xsl file -->
> <xsl:import href="http://yourserver.edu/path/to/your/imported.xsl"/>
>
>    <xsl:template match="/">
>      <xsl:text>Hey there!</xsl:text>
>    </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> When I do, I get a 503 error in the logs related to DTD issues.
>
> I wrote it up as http://jira.sakaiproject.org/browse/SAK-17423.
> It seems like it is similar to the stack trace that was occurring  
> in free form portfolios in http://jira.sakaiproject.org/browse/ 
> SAK-16536.
>
> This is 2-6-x branch r69087.
>
>
> Sean Keesler
> 130 Academy Street
> Manlius, New York 13104 USA
> 315-663-7756
> sean.keesler at threecanoes.com
>
>
>
> _______________________________________________
> portfolio mailing list
> portfolio at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/portfolio
>
> TO UNSUBSCRIBE: send email to portfolio- 
> unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
>
>
>
>
> <test.JPG><portfoliotemplate.xsl>
> _______________________________________________
> portfolio mailing list
> portfolio at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/portfolio
>
> TO UNSUBSCRIBE: send email to portfolio- 
> unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/portfolio/attachments/20091120/c118cd2c/attachment-0001.html 


More information about the portfolio mailing list