Re: [xsl] [Using xsltproc]: output of running XSLT is missing xmlns attributes

Subject: Re: [xsl] [Using xsltproc]: output of running XSLT is missing xmlns attributes
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 5 May 2022 09:52:12 -0000
On 05.05.2022 11:47, ohaya ohaya@xxxxxxxxx wrote:
and the output that I am getting is:

<?xml version="1.0"?>
<exp:Export xmlns:L7p="http://www.layer7tech.com/ws/policy";
xmlns:exp="http://www.layer7tech.com/ws/policy/export";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy"; Version="3.0">
   <exp:References/>
   <wsp:Policy>
     <wsp:All wsp:Usage="Required">
       <L7p:AuditAssertion>
         <L7p:Level stringValue="INFO"/>
       </L7p:AuditAssertion>
       <L7p:AuditDetailAssertion>
         <L7p:Detail stringValue="2222"/>
       </L7p:AuditDetailAssertion>
       <L7p:AuditDetailAssertion>
         <L7p:Detail stringValue="333"/>
       </L7p:AuditDetailAssertion>
       <wsp:OneOrMore wsp:Usage="Required">
         <wsp:OneOrMore wsp:Usage="Required">
           <L7p:AuditDetailAssertion>
             <L7p:Detail stringValue="444"/>
           </L7p:AuditDetailAssertion>
         </wsp:OneOrMore>
         <wsp:OneOrMore wsp:Usage="Required">
           <L7p:AuditDetailAssertion>
             <L7p:Detail stringValue="555"/>
           </L7p:AuditDetailAssertion>
         </wsp:OneOrMore>
       </wsp:OneOrMore>
     </wsp:All>
   </wsp:Policy>
</exp:Export>

Notice that in the output, the <wsp:Policy> is missing the two "xmlns"
attributes, "xmlns:L7p" and "xmlns:wsp".

How can I get the XSLT to include those "xmlns" attributes on the
<wsp:Policy> element?


Both namespaces are defined already higher up in the tree so there is no need to duplicate that declaration.

Current Thread