santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "m2 r2sj" <m2r...@gmail.com>
Subject Re: Namespace issue
Date Mon, 01 May 2006 23:08:14 GMT
Thanks for the reply.I have attached the XSLT below for your reference.

I did quite R&D on the XSLT signature for both DOM and JDOM and am still
facing issue with namespaces.I need an expert help in resolving the
namespace issue.

Here are the steps for DOM XSLT signature :
1)Set the namespace aware to true  as follows.
 DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
 dbf.setNamespaceAware(true);
2)Parsed the DOM and signed  an XSLT - Works fine
 <xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
            <xsl:template match="/">
              <xsl:copy-of select="Flow"/>
            </xsl:template>
</xsl:stylesheet>
3)Then validated   - Works fine.
If i don't set the namespace aware to true, the signing & validation fail.

Here are steps for JDOM XSLT signature
1)Converted DOM to JDOM using DOMOutputter
2)Singed DOM converted from JDOM- I get the following error
I dont see the way to set the namespace aware to true for the
DOMOutputter so that DOM converted from JDOM aware that namesspace

Can any expert point me what i am doing wrong / best way to set the
namespace aware for the DOM conveted from JDOM to resolve this issue.


<?xml version="1.0" encoding="UTF-8" ?>
<Flow Id="new" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Empid>121212</Empid>
<Salary>120000</Salary>
<Command>
  <xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
            <xsl:template match="/">
              <xsl:copy-of select="Flow/Salary"/>
            </xsl:template>
 </xsl:stylesheet>
</Command>
<Skills>
  <xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
            <xsl:template match="/">
              <xsl:copy-of select="Flow"/>
            </xsl:template>
</xsl:stylesheet>
</Skills>
</Flow>

 Thanks in advance.I would really appreciate any expert help!




On 4/28/06, Milan Tomic <tomicmilan@yahoo.com> wrote:
>
>
> We are not able to help you, unless you show us small peace of your code
> and XML (XSLT). I suppose
> that mentioned exception throws XML parser (Xerces)? In that case you
> might ask this question in
> Xerces mailing list. Btw, have you used setNamespaceAware(true) method?
>
> Best regards,
> Milan
>
>
> --- m2 r2sj <m2r2sj@gmail.com> wrote:
>
> > I am doing an XSLT signature and validation.When i do an XSLT sign , i
> am
> > not getting any error, it is working fine.But when i try to validate an
> > XSLT , i am getting the following error.
> > Help would be appreciated.Can any expert provide a resolution to this
> issue.
> >
> > SystemId Unknown; Line #8; Column #141; Attribute "xsl" bound to
> namespace "
> > http://www.w3.org/2000/xmlns/" was already specified for element
> > "xsl:stylesheet".
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Mime
View raw message