I use the stylesheet below to display an xml fragment from the xsp page
result.  It seems to me you could do the same thing - just have
type="text/html"

marty


<xsl:stylesheet
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>
<xsl:template match="/page">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="lom">
<xsl:processing-instruction name="cocoon-format">type="text/xml"
</xsl:processing-instruction>
<xsl:copy-of select="." />
</xsl:template>

</xsl:stylesheet>

> -----Original Message-----
> From: David Rosenstrauch [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, November 16, 2001 10:41 AM
> To: [EMAIL PROTECTED]
> Subject: Re: XSP namespace question
> 
> 
> Whoops!  Meant to say:
> 
> "Would kinda suck if I ***CAN'T*** remove all the namespace 
> declarations from my HTML."
> 
> It really is making the HTML really long and ugly.
> 
> 
> DR
> 
> 
> At 09:26 AM 11/16/01 -0500, you wrote:
> >Thanks for the tip.
> >
> >I thought I tried this ... but it was really late, so maybe I did 
> >something stupid.
> >
> >On the other hand though:  I thought I saw something in my XSL book 
> >that said that 'exclude-result-prefixes' won't work when 
> you're using 
> ><xsl:copy>.  Anyone else hear that?
> >
> >Would kinda suck if I can remove all the namespace 
> declarations from my 
> >HTML.  Granted it is just cosmetic, but it's making the HTML really 
> >long and ugly.
> >
> >If anybody knows anything else, please let me know.
> >
> >
> >Thanks,
> >
> >DR
> >
> >
> >At 10:41 AM 11/16/01 +0100, you wrote:
> > >Hi David,
> > >
> > >in XSLT there is an attribute of <xsl:stylesheet> called 
> > >'exclude-result-prefixes'. I don't think that this will 
> work already 
> > >on the XSP, but at least in your XSL. Give it a try:
> > >
> > ><xsl:stylesheet exclude-result-prefixes="xsp" version="1.0" 
> > >xmlns:xsl="..">
> > >
> > >It's a whitespace-separated list.
> > >
> > >If this doesn't work (because you only copy the node), try 
> > ><xsl:element name="{name()}"> instead of <xsl:copy>. It gives the 
> > >same result. With <xsl:copy-of select=".."> it's much more 
> difficult.
> > >
> > >But the first hint should already work.
> > >
> > >Joerg
> > >
> > >----- Original Message -----
> > >From: "David Rosenstrauch" <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >Sent: Friday, November 16, 2001 9:02 AM
> > >Subject: XSP namespace question
> > >
> > >
> > > > Given an xsp page like this:
> > > >
> > > >
> > > > <xsp:page
> > > > xmlns:xsp="http://apache.org/xsp";
> > > > language="java"
> > > >  >
> > > >      <page name="abc"/>
> > > > </xsp:page>
> > > >
> > > >
> > > > Cocoon seems to be giving me output like this:
> > > >
> > > > <page xmlns:xsp="http://apache.org/xsp"/>
> > > >
> > > >
> > > > Is it necessary though that the namespace declaration 
> get copied 
> > > > to the
> > >output?  It's certainly not necessary any longer once the XSP has 
> > >been run.
> > > >
> > > > Is there a way to turn off the copying of the namespace 
> like this?
> > > >
> > > > This is causing me problems later on.  My XSP page actually 
> > > > contains much
> > >more than this and when I apply a stylesheet (which uses 
> xsl:copy), 
> > >the namespace is getting copied to the HTML output.  I'd like to 
> > >avoid that if possible.
> > > >
> > > > Any ideas?
> > > >
> > > >
> > > > Tnx!
> > > >
> > > > DR
> > >
> > >
> > >
> > 
> >---------------------------------------------------------------------
> > >Please check that your question has not already been 
> answered in the 
> > >FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > >To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > >For additional commands, e-mail: <[EMAIL PROTECTED]>
> >
> >
> >---------------------------------------------------------------------
> >Please check that your question has not already been answered in the 
> >FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> >To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> >For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to