You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Oro smith <or...@sify.com> on 2004/06/30 05:28:19 UTC
XSL doubt
I have an xsl which begins like this:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:page="http://apache.org/cocoon/paginate/1.0"
I also have <br> tags inside xsl. The xsl is used to generate wml.
however when the wml is generated every br tag has an xmlns associated with it.
<br xmlns:page="http://apache.org/cocoon/paginate/1.0">
How can this be removed?
Re: XSL doubt
Posted by Dirk Gronert <u1...@hs-harz.de>.
Hello Oro,
there are also other ways to solve your problem:
(1) in the stylesheet
the <xsl:stylesheet/> support the attribute exclude-result-prefixes.
exclude-result-prefixes is a white-space delimited list of
namespaces to supress in the output. E.g.:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:page="http://apache.org/cocoon/paginate/1.0"
exclude-result-prefixes="page">
...
</xsl>
(2) with the help of the serializer
write a own serializer and extends from the wml serializer.
Overwrite the following Methods :
public void endPrefixMapping(String prefix) throws SAXException
{
// TODO Auto-generated method stub
}
public void startPrefixMapping(String prefix, String uri) throws
SAXException {
// TODO Auto-generated method stub
}
But with this approach you have no namespaces in your
output-document!
I hope I could give you a little help!
Dirk
Oro smith wrote:
> I have an xsl which begins like this:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:page="http://apache.org/cocoon/paginate/1.0"
>
>
> I also have <br> tags inside xsl. The xsl is used to generate wml.
> however when the wml is generated every br tag has an xmlns associated with it.
>
> <br xmlns:page="http://apache.org/cocoon/paginate/1.0">
>
> How can this be removed?
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XSL doubt
Posted by "Volkm@r" <pl...@arcor.de>.
Oro smith wrote:
> I have an xsl which begins like this:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:page="http://apache.org/cocoon/paginate/1.0"
>
>
> I also have <br> tags inside xsl. The xsl is used to generate wml.
> however when the wml is generated every br tag has an xmlns associated with it.
>
> <br xmlns:page="http://apache.org/cocoon/paginate/1.0">
>
> How can this be removed?
>
>
If you are generating wml, what about setting standard namespace to wml
as well?
<xsl:stylesheet version="1.0"
xmlns="http://www.wapforum.org/2001/wml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:page="http://apache.org/cocoon/paginate/1.0">
--
Volkmar W. Pogatzki
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org