On 8/31/05, Rolando Isidoro <[EMAIL PROTECTED]> wrote: > Hi once again, after not being able of performing the integration of the > external data as I wanted in first place, as described is the mail thread > with the subject "Integrating external data into Lenya" started at > 2005-07-28, I've been instructed to try something a little simpler. Instead > of showing the default data from a staff member, now after clicking the > profile link, the new page must only show the data from the external source > fully integrated in the publication's layout. > Some problems occur with this code: > - if I keep the transformation with page2xhtml.xsl, the data from the > external source doesn't appear, if I comment it, the menus, tabs, > breadcrumbs and every other page element isn't rendered according to the > layout. Do I have to add some kind of match in the page2xhtml.xsl file so it > enables the external data to be showed? How can I do that? > - the links in the tabs and menus aren't correct, instead of > http://.../lenya/gris/live/index.html the url appears as > http://.../lenya/gris/live/staff/asg/index.html, the > same happens to every other url, how can I perform a link-rewrite that > removes the staff/asg sub-string from the url's?
The first problem is because your external XML is not matching properly. Does the first create XML with the main tag <xhtml:div id="body">? You should force that tag in OAI2xhtml.xsl. The "xhtml" prefix is added because of the "xmlns" parameter: <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="/"> <div id="body"> My content </div> </xsl:template> </xsl:stylesheet> will create: <xhtml:div id="body">My content</xhtml:div> (An alternative is to change your page2xhtml.xsl to use the tag resulting from OAI2xhtml.xsl. You should create "page2xhtml-OAI.xsl", and then you'll have maintenance issues.) --- The second problem is because your links are not created properly. If they are created in XSL, then they should be "/{root}/newpage.html". Maybe you have a "{document-id}/" in them? If the second problem is with the navigation menus, it is because you are setting the menus to the homepage, so they are relative to "/", but your page's URL is actually ".../staff/asg/". Correct the XMAP to use the current page: <map:part src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/menu/staff/{2}/index.xml"/> An alternative is to add a slash in menu.xsl <a href="[EMAIL PROTECTED]"> Becomes: <a href="/[EMAIL PROTECTED]"> But that may break other things. --- If you still have problems, we need to see OAI2xhtml.xsl and xslt/page2xhtml.xsl to find the mistakes. Your email looks funny. Please set your email program to "text-only". solprovider --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
