How to retain the namespace xmlns:enc in XML thro XSLT ?





I am trying to pass the namespace, which is in my Original Message, to
a Java method for further processing. In the original message the
xmlns:xenc namespace is present. I make a call to Java function and
pass the whole XML message along with tags and values. In my Java
function when I tried to print the XML message which is receieved by
the XSLT proc. it has omitted the xmlns:xenc namespace which is
creating a problem in Java function for further processing. How can I
instruct the XSLT processor not to omit any of the namespaces which is
in the Original Namespaces so that Java fucntion will receive the fully
qualified XML message?

Original Message which is passing to the XSLT Processor with xmlns:xenc
namespace
<XIPMessage version="1.0">
<XIPBody>
<OrderHeader>
<EMasterNumber>11111</EMasterNumber>
<xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#
" Type="http://www.w3.org/2001/04/xmlenc#Element";>
<xenc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
<ds:KeyInfo>
<xenc:EncryptedKey>
<xenc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
<xenc:CipherData>
<xenc:CipherValue>KA1ia0wKl3KfCS</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedKey>
</ds:KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>aKN68CYqMqXa+</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
<PONumber>101012</PONumber>
</OrderHeader>
</XIPBody>
</XIPMessage>


Message going from XSLT processor to Java fuction:(Omitting the
xmlns:xenc namespace)
<XIPMessage version="1.0">
<XIPBody>
<OrderHeader>
<EMasterNumber>11111</EMasterNumber>
<xenc:EncryptedData
Type="http://www.w3.org/2001/04/xmlenc#Element";>
<xenc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
<ds:KeyInfo>
<xenc:EncryptedKey>
<xenc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
<xenc:CipherData>
<xenc:CipherValue>KA1ia0wKl3KfCS</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedKey>
</ds:KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>aKN68CYqMqXa+</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
<PONumber>101012</PONumber>
</OrderHeader>
</XIPBody>
</XIPMessage>



XSL:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";
xmlns:java="http://xml.apache.org/xslt/java";
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";
xmlns:decrypter="com.xerox.xip.x509.Decrypter">

<xsl:template match="/">
<xsl:apply-templates select="decrypter:decryptXMLNode(.)"/> - Calling
Java Mehod which does decryption of message
</xsl:template>
.......
.......
....further validations only on elements of XML...
</xsl:stylesheet>


Thanks in adance
Rajesh

.



Relevant Pages

  • How to retain the namespace xmlns:enc in XML thro XSLT ?
    ... I am trying to pass the namespace, which is in my Original Message, to ... a Java method for further processing. ... Original Message which is passing to the XSLT Processor with xmlns:xenc ...
    (comp.text.xml)
  • Re: Hypothetical: All code in classes but main()
    ... the argument Stroustrup gives for having helper functions at namespace ... If a function requires access to member data, then by all means make it ... > There are advantages to having the static Math class in Java. ...
    (comp.lang.cpp)
  • Re: C# vs VB.Net
    ... CSC students code in java for most classes. ... C# puts in "namespace MyCompany.Technology.Args" for you. ... there is no simple way of telling the runtime not to serialize ... VB.NET has no within-the-line comment syntax ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Connecting to Analysis Services with Java XML
    ... I said to change the "namespace" and not the content (you may also need to ... The xmlns specifies a namespace (sort of like a Java package). ... Is there a way of looking at the request stream ... "DataSourceInfo". ...
    (microsoft.public.data.xmlanalysis)
  • Re: Question of a Java programmer
    ... similar to packages, but there really *isn't* a concept like an assembly in Java. ... You *can* add metadata to a jar file saying that no other jar files are allowed to add to a namespace, ...
    (microsoft.public.dotnet.languages.csharp)