<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match="*[not(*) and not(text())]">
<xsl:copy>
<xsl:attribute
name="xsi:nil"
namespace="http://www.w3.org/2000/10/XMLSchema-instance" >
<xsl:text>True</xsl:text>
</xsl:attribute>
<xsl:variable name="value" select="3" />
<test x="ttt{$value}" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="utf-8"?>
<aaia:AddRequestForQuote xmlns:aaia="http://www.aftermarket.org/oagis">
<oa:ApplicationArea xmlns:oa="http://www.openapplications.org/oagis">
<oa:Sender>
<oa:LogicalId>NEXPART</oa:LogicalId>
<oa:ReferenceId>3BA23E0C-B942-E7C1-C3CC-C7FE50A68046</oa:ReferenceId>
<oa:Confirmation>0</oa:Confirmation>
</oa:Sender>
<oa:CreationDateTime>2008-12-18T21:23:10Z</oa:CreationDateTime>
<oa:BODId>3BA23E0C-B942-E7C1-C3CC-C7FE50A680</oa:BODId>
</oa:ApplicationArea>
<oa:DataArea xmlns:oa="http://www.openapplications.org/oagis">
<oa:Add confirm="Always" />
<oa:RequestForQuote>
<aaia:Header>
<oa:Parties>
<oa:BillToParty>
<oa:PartyId>
<oa:Id>6595</oa:Id>
</oa:PartyId>
</oa:BillToParty>
<oa:ShipFromParty>
<oa:PartyId>
<oa:Id>8</oa:Id>
</oa:PartyId>
</oa:ShipFromParty>
<oa:ShipFromParty>
<oa:PartyId>
<oa:Id>7</oa:Id>
</oa:PartyId>
</oa:ShipFromParty>
</oa:Parties>
</aaia:Header>
<aaia:Line>
<oa:LineNumber>1</oa:LineNumber>
<aaia:OrderItem>
<aaia:ItemIds>
<aaia:SupplierItemId>
<oa:Id>13 427</oa:Id>
</aaia:SupplierItemId>
<aaia:SupplierCode>IMC</aaia:SupplierCode>
</aaia:ItemIds>
</aaia:OrderItem>
<oa:OrderQuantity uom="EACH">1</oa:OrderQuantity>
</aaia:Line>
</oa:RequestForQuote>
</oa:DataArea>
</aaia:AddRequestForQuote>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:variable name="prefix">
<xsl:if test="namespace-uri() = 'http://www.openapplications.org/oagis'">
<xsl:text>oa</xsl:text>
</xsl:if>
<xsl:if test="namespace-uri() = 'http://www.aftermarket.org/oagis'">
<xsl:text>aaia</xsl:text>
</xsl:if>
</xsl:variable>
<xsl:element name="{$prefix}:{local-name()}" namespace="{namespace-uri()}">
<xsl:apply-templates select="node() | @*"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
java.io.InputStream in = com.imc.bod.model.BODReader.class.getClassLoader().getResourceAsStream("com/imc/bod/model/IPO_xslt.xsl");
Document result;
/* 120*/ try
{
/* 120*/ System.err.println(xml.toString());
/* 122*/ Builder builder = nonValidatingBuilder;
/* 123*/ Document doc = builder.build(xml.toString(), null);
/* 125*/ Document stylesheet = builder.build(in);
/* 126*/ XSLTransform transform = new XSLTransform(stylesheet);
/* 127*/ Nodes output = transform.transform(doc);
/* 128*/ result = XSLTransform.toDocument(output);
}
<?xml version="1.0" encoding="UTF-8"?>
<oagis_1:AddRequestForQuote xmlns:oagis="http://www.openapplications.org/oagis" xmlns:oagis_1="http://www.aftermarket.org/oagis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation=" http://www.aftermarket.org/oagis wsjar:file:/home/wasadmin/profiles/imc_managed/installedApps/imc/OMSTest.ear/IPORuntime.jar!/AAIA/BODs/AddRequestForQuote.xsd http://www.openapplications.org/oagis wsjar:file:/home/wasadmin/profiles/imc_managed/installedApps/imc/OMSTest.ear/IPORuntime.jar!/OAGIS/BODs/AddRequestForQuote.xsd" >
<oagis:ApplicationArea>
<oagis:Sender>
<oagis:LogicalId>NEXPART</oagis:LogicalId>
<oagis:ReferenceId>3BA23E0C-B942-E7C1-C3CC-C7FE50A68094</oagis:ReferenceId>
<oagis:Confirmation>0</oagis:Confirmation>
</oagis:Sender>
<oagis:CreationDateTime>2008-12-18T21:23:10Z</oagis:CreationDateTime>
<oagis:BODId>3BA23E0C-B942-E7C1-C3CC-C7FE50A694</oagis:BODId>
</oagis:ApplicationArea>
<oagis:DataArea>
<oagis:Add confirm="Always"/>
<oagis:RequestForQuote>
<oagis_1:Header>
<oagis:Parties>
<oagis:BillToParty>
<oagis:PartyId>
<oagis:Id>6595</oagis:Id>
</oagis:PartyId>
</oagis:BillToParty>
<oagis:ShipFromParty>
<oagis:PartyId>
<oagis:Id>8</oagis:Id>
</oagis:PartyId>
</oagis:ShipFromParty>
<oagis:ShipFromParty>
<oagis:PartyId>
<oagis:Id>7</oagis:Id>
</oagis:PartyId>
</oagis:ShipFromParty>
</oagis:Parties>
</oagis_1:Header>
<oagis_1:Line>
<oagis:LineNumber>1</oagis:LineNumber>
<oagis_1:OrderItem>
<oagis_1:ItemIds>
<oagis_1:SupplierItemId>
<oagis:Id>13 427</oagis:Id>
</oagis_1:SupplierItemId>
<oagis_1:SupplierCode>IMC</oagis_1:SupplierCode>
</oagis_1:ItemIds>
</oagis_1:OrderItem>
<oagis:OrderQuantity uom="EACH">1</oagis:OrderQuantity>
</oagis_1:Line>
</oagis:RequestForQuote>
</oagis:DataArea>
</oagis_1:AddRequestForQuote>
<aaia:AddRequestForQuote schemaLocation=" http://www.aftermarket.org/oagis wsjar:file:/home/wasadmin/profiles/imc_managed/installedApps/imc/OMSTest.ear/IPORuntime.jar!/AAIA/BODs/AddRequestForQuote.xsd http://www.openapplications.org/oagis wsjar:file:/home/wasadmin/profiles/imc_managed/installedApps/imc/OMSTest.ear/IPORuntime.jar!/OAGIS/BODs/AddRequestForQuote.xsd" xmlns:aaia="http://www.aftermarket.org/oagis">
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="*" priority="5">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:variable name="prefix">
<xsl:if test="namespace-uri() = 'http://www.openapplications.org/oagis'">
<xsl:text>oa</xsl:text>
</xsl:if>
<xsl:if test="namespace-uri() = 'http://www.aftermarket.org/oagis'">
<xsl:text>aaia</xsl:text>
</xsl:if>
</xsl:variable>
<xsl:element name="{$prefix}:{local-name()}" namespace="{namespace-uri()}">
<xsl:apply-templates select="node() | @*"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match="*" priority="5">
<xsl:variable name="prefix">
<xsl:if test="namespace-uri() = 'http://www.openapplications.org/oagis'">
<xsl:text>oa</xsl:text>
</xsl:if>
<xsl:if test="namespace-uri() = 'http://www.aftermarket.org/oagis'">
<xsl:text>aaia</xsl:text>
</xsl:if>
</xsl:variable>
<xsl:element name="{$prefix}:{local-name()}" namespace="{namespace-uri()}">
<xsl:apply-templates select="node() | @*"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<oagis_1:AddRequestForQuote xmlns:oagis="http://www.openapplications.org/oagis" xmlns:oagis_1="http://www.aftermarket.org/oagis">
<oa:ApplicationArea xmlns:oa="http://www.openapplications.org/oagis">
<oa:Sender>
<oa:LogicalId>NEXPART</oa:LogicalId>
<oa:ReferenceId>3BA23E0C-B942-E7C1-C3CC-C7FE50A68095</oa:ReferenceId>
<oa:Confirmation>0</oa:Confirmation>
</oa:Sender>
<oa:CreationDateTime>2008-12-18T21:23:10Z</oa:CreationDateTime>
<oa:BODId>3BA23E0C-B942-E7C1-C3CC-C7FE50A695</oa:BODId>
</oa:ApplicationArea>
<oa:DataArea xmlns:oa="http://www.openapplications.org/oagis">
<oa:Add confirm="Always"/>
<oa:RequestForQuote>
<aaia:Header xmlns:aaia="http://www.aftermarket.org/oagis">
<oa:Parties>
<oa:BillToParty>
<oa:PartyId>
<oa:Id>6595</oa:Id>
</oa:PartyId>
</oa:BillToParty>
<oa:ShipFromParty>
<oa:PartyId>
<oa:Id>8</oa:Id>
</oa:PartyId>
</oa:ShipFromParty>
<oa:ShipFromParty>
<oa:PartyId>
<oa:Id>7</oa:Id>
</oa:PartyId>
</oa:ShipFromParty>
</oa:Parties>
</aaia:Header>
<aaia:Line xmlns:aaia="http://www.aftermarket.org/oagis">
<oa:LineNumber>1</oa:LineNumber>
<aaia:OrderItem>
<aaia:ItemIds>
<aaia:SupplierItemId>
<oa:Id>13427</oa:Id>
</aaia:SupplierItemId>
<aaia:SupplierCode>IMC</aaia:SupplierCode>
</aaia:ItemIds>
</aaia:OrderItem>
<oa:OrderQuantity uom="EACH">1</oa:OrderQuantity>
</aaia:Line>
</oa:RequestForQuote>
</oa:DataArea>
</oagis_1:AddRequestForQuote>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match="/ | *" priority="5">
<xsl:variable name="prefix">
<xsl:if test="namespace-uri() = 'http://www.openapplications.org/oagis'">
<xsl:text>oa</xsl:text>
</xsl:if>
<xsl:if test="namespace-uri() = 'http://www.aftermarket.org/oagis'">
<xsl:text>aaia</xsl:text>
</xsl:if>
</xsl:variable>
<xsl:element name="{$prefix}:{local-name()}" namespace="{namespace-uri()}">
<xsl:apply-templates select="node() | @*"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<aaia:AddRequestForQuote xmlns:aaia="http://www.aftermarket.org/oagis" schemaLocation=" http://www.aftermarket.org/oagis wsjar:file:/home/wasadmin/profiles/imc_managed/installedApps/imc/OMSTest.ear/IPORuntime.jar!/AAIA/BODs/AddRequestForQuote.xsd http://www.openapplications.org/oagis wsjar:file:/home/wasadmin/profiles/imc_managed/installedApps/imc/OMSTest.ear/IPORuntime.jar!/OAGIS/BODs/AddRequestForQuote.xsd">
<oa:ApplicationArea xmlns:oa="http://www.openapplications.org/oagis">
<oa:Sender>
<oa:LogicalId>NEXPART</oa:LogicalId>
<oa:ReferenceId>3BA23E0C-B942-E7C1-C3CC-C7FE50A68097</oa:ReferenceId>
<oa:Confirmation>0</oa:Confirmation>
</oa:Sender>
<oa:CreationDateTime>2008-12-18T21:23:10Z</oa:CreationDateTime>
<oa:BODId>3BA23E0C-B942-E7C1-C3CC-C7FE50A697</oa:BODId>
</oa:ApplicationArea>
<oa:DataArea xmlns:oa="http://www.openapplications.org/oagis">
<oa:Add confirm="Always" />
<oa:RequestForQuote>
<aaia:Header>
<oa:Parties>
<oa:BillToParty>
<oa:PartyId>
<oa:Id>6595</oa:Id>
</oa:PartyId>
</oa:BillToParty>
<oa:ShipFromParty>
<oa:PartyId>
<oa:Id>8</oa:Id>
</oa:PartyId>
</oa:ShipFromParty>
<oa:ShipFromParty>
<oa:PartyId>
<oa:Id>7</oa:Id>
</oa:PartyId>
</oa:ShipFromParty>
</oa:Parties>
</aaia:Header>
<aaia:Line>
<oa:LineNumber>1</oa:LineNumber>
<aaia:OrderItem>
<aaia:ItemIds>
<aaia:SupplierItemId>
<oa:Id>13 427</oa:Id>
</aaia:SupplierItemId>
<aaia:SupplierCode>IMC</aaia:SupplierCode>
</aaia:ItemIds>
</aaia:OrderItem>
<oa:OrderQuantity uom="EACH">1</oa:OrderQuantity>
</aaia:Line>
</oa:RequestForQuote>
</oa:DataArea>
</aaia:AddRequestForQuote>