2013-05-17 96 views
0

我想重命名/從輸出XML中刪除命名空間前綴。 但是,其中一個頂層元素應該包含不帶前綴的名稱空間聲明。重命名元素的XSLT問題 - 更改命名空間

XSLT無法正常工作。在某些情況下,我仍然可以在輸出XML中看到名稱空間前綴,並且名稱空間不會顯示在我想查看的元素中。

我試過使用排除結果前綴和一些模板,但無法正常工作。 只是爲了澄清我使用XSLT提前1.0

謝謝...

XSLT:

<?xml version="1.0" encoding="utf-8"?> 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
    xmlns:ns0="http://somenamespace" 
    xmlns:ac="http://ac.namespace" 
    exclude-result-prefixes="ns0 msxsl ac"> 

    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" encoding="utf-8"/> 

    <xsl:template match="node() | @*"> 
    <xsl:copy> 
     <xsl:apply-templates select="node() | @*" /> 
    </xsl:copy> 
    </xsl:template> 


    <xsl:template match="node()|comment()|processing-instruction()"> 
    <xsl:copy> 
     <xsl:apply-templates/> 
    </xsl:copy> 
    </xsl:template> 

    <xsl:template match="*"> 
    <xsl:element name="{local-name()}"> 
     <xsl:apply-templates select="@*|node()"/> 
    </xsl:element> 
    </xsl:template> 

    <xsl:template match="@*"> 
    <xsl:attribute name="{local-name()}"> 
     <xsl:value-of select="."/> 
    </xsl:attribute> 
    </xsl:template> 

    <!--<xsl:template match="@*[local-name(.)='ns0']"/>--> 

    <xsl:template match="ns0:Cedent/ns0:Party/ns0:Id[. = '']"> 
    <xsl:copy> 
     <xsl:apply-templates select="@*" /> 
     <xsl:apply-templates select="../../following-sibling::ns0:Broker[1]/ns0:Party/ns0:Id/node()" /> 
    </xsl:copy> 
    </xsl:template> 

    <xsl:template match="ns0:Cedent/ns0:Party/ns0:Id/@Agency[. = '']"> 
    <xsl:attribute name="Agency">DUNS_dun_and_bradstreet</xsl:attribute> 
    </xsl:template> 

    <xsl:template match="ns0:Reinsurer[not(ns0:Party/ns0:Id and ns0:Party/ns0:Id/@Agency)]" /> 

    <xsl:template match="ns0:Reinsurer/ns0:Contact[not(ns0:PersonName)]" /> 

    <xsl:template match="ns0:Reinsurer/ns0:Contact/*[not(node())]" /> 

    <xsl:template match="ns0:Broker/ns0:Contact/ns0:Telephone[.='']" /> 

    <xsl:template match="ns0:ServiceProvider[. = '6']" /> 

    <xsl:template match="ns0:ServiceProvider[not(ns0:Party/ns0:Id and ns0:Party/ns0:Id/@Agency)]" /> 

    <xsl:template match="ns0:Contract/ns0:ContractGroupName[not(node())]" /> 

    <xsl:template match="ns0:Endorsement[ns0:Placing/ns0:PlacingStage = 'endorsement']" /> 

    <xsl:template match="ns0:Endorsement/ns0:EndorsementReference[not(node())]" /> 

    <xsl:template match="ns0:Endorsement/ns0:EndorsementName[not(node())]" /> 

    <xsl:template match="ns0:Endorsement/ns0:Description[not(node())]" /> 

    <xsl:template match="ns0:Endorsement/ns0:EffectiveDate[not(node())]" /> 

    <xsl:template match="ns0:ContractSection/ns0:BrokerSharePercentage[not(node()) and ns0:ContractSection/ns0:BrokerSharePercentage/ns0:Rate > 0]" /> 

    <xsl:template match="ns0:ContractSection/ns0:RiskLocation[not(node()) or (ns0:PlacingTransactionFunction = 'request_for_line_or_binder' or ns0:PlacingTransactionFunction = 'signed_line_advice' or ns0:PlacingTransactionFunction = 'quotation_request' or ns0:PlacingTransactionFunction = 'endorsement_request')]" /> 

    <xsl:template match="ns0:ContractSection/ns0:RiskLocation/ns0:Location/ns0:Supraentity[not(node())]" /> 

    <xsl:template match="ns0:ContractSection/ns0:RiskLocation/ns0:Location/ns0:Country[not(node())]" /> 

    <xsl:template match="ns0:ContractSection/ns0:PerilsIncluded[not(ns0:Peril/ns0:PerilType !='')]" /> 

    <xsl:template match="ns0:OrderPercentage"> 
    <xsl:copy> 
     <xsl:apply-templates/> 
    </xsl:copy> 
    <ns0:LinesPercentageOfOrderIndicator> 
     <xsl:value-of select="ancestor::ns0:Placing/ns0:PlacingTransactionFunction = 'signed_line_advice' and ns0:Rate > 100"/> 
    </ns0:LinesPercentageOfOrderIndicator> 
    </xsl:template> 

    <xsl:template match="ns0:ContractSection/ns0:Brokerage[descendant::ns0:Rate = '' and not(ns0:ContractSection/ns0:BrokeragePercentage/ns0:Rate > 0)]" /> 

    <xsl:template match="ns0:ContractSection/ns0:ContractMarket/ns0:Reinsurer[descendant::ns0:Id = '' and not(ns0:Party/ns0:Id/@Agency[. != ''])]" /> 

    <xsl:template match="ns0:ContractSection/ns0:ContractMarket/ns0:ReinsurerContractReference[not(node())]" /> 

    <xsl:template match="ns0:ContractSection/ns0:ContractMarket/ns0:ReinsurerQuoteMaximumSharePercentage[descendant::ns0:Rate = '']" /> 

    <xsl:template match="ns0:ContractSection/ns0:ContractMarket/ns0:ReinsurerWrittenPercentage[descendant::ns0:Rate = '' and ns0:PlacingTransactionFunction = 'signed_line_advice']" /> 

</xsl:stylesheet> 

樣品輸入:

<ns0:Root xmlns:ns0="http://somenamespace"> 
    <ns0:Placing Sender="broker" Receiver="serviceprovider"> 
     <ns0:UUId>GUID</ns0:UUId> 
     <ns0:BrokerReference>2B3B8992-3185-48EE-A030-0F61EFF7C7EB</ns0:BrokerReference> 
     <ns0:ServiceProviderReference>16</ns0:ServiceProviderReference> 
     <ns0:PlacingStage>order</ns0:PlacingStage> 
     <ns0:PlacingTransactionFunction>signed_line_advice</ns0:PlacingTransactionFunction> 
     <ns0:TransactionReasonDescription></ns0:TransactionReasonDescription> 
     <ns0:Cedent> 
      <ns0:Party> 
       <ns0:Id Agency=""></ns0:Id> 
       <ns0:Name>Bahamas First General Insurance Co/Aon Benfield Canada</ns0:Name> 
      </ns0:Party> 
     </ns0:Cedent> 
     <ns0:Reinsurer> 
      <ns0:Party> 
       <ns0:Id Agency=""></ns0:Id> 
       <ns0:Name>RI3K</ns0:Name> 
      </ns0:Party> 
      <ns0:Contact> 
       <ns0:PersonName>test</ns0:PersonName> 
       <ns0:Telephone></ns0:Telephone> 
       <ns0:Email>[email protected]</ns0:Email> 
      </ns0:Contact> 
     </ns0:Reinsurer> 
     <ns0:Broker> 
      <ns0:Party> 
       <ns0:Id Agency="DUNS_dun_and_bradstreet">292320710</ns0:Id> 
       <ns0:Name>Aon Benfield UK</ns0:Name> 
      </ns0:Party> 
      <ns0:Contact> 
       <ns0:PersonName>Jenny Edwards</ns0:PersonName> 
       <ns0:Telephone>reinsurance_contract</ns0:Telephone> 
       <ns0:Email>[email protected]</ns0:Email> 
      </ns0:Contact> 
     </ns0:Broker> 
     <ns0:ServiceProvider> 
      <ns0:Party> 
       <ns0:Id Agency="DUNS_dun_and_bradstreet">239195295</ns0:Id> 
      </ns0:Party> 
     </ns0:ServiceProvider> 
     <ns0:Contract> 
      <ns0:ContractName>FINCO QUOTA SHARE TREATY</ns0:ContractName> 
      <ns0:ContractGroupName>BFG FINCO QUOTA SHARE TREATY</ns0:ContractGroupName> 
      <ns0:ContractType>0</ns0:ContractType> 
      <ns0:BrokerReference>B110813BDO1053</ns0:BrokerReference> 
      <ns0:BrokerGroupReference>200153436</ns0:BrokerGroupReference> 
      <ns0:BrokerRiskReference>13BDO1053</ns0:BrokerRiskReference> 
     </ns0:Contract> 
     <ns0:Endorsement> 
      <ns0:EndorsementReference>0</ns0:EndorsementReference> 
      <ns0:EndorsementName></ns0:EndorsementName> 
      <ns0:Description></ns0:Description> 
      <ns0:EffectiveDate></ns0:EffectiveDate> 
     </ns0:Endorsement> 
     <ns0:ContractSection ContractReportingLevel="section_level"> 
      <ns0:HighLevelReference>01</ns0:HighLevelReference> 
      <ns0:CoverType>quota_share</ns0:CoverType> 
      <ns0:ContractPeriod> 
       <ns0:StartDate DateIndicator="Jan 1 2013 12:00AM"></ns0:StartDate> 
       <ns0:EndDate DateIndicator="Dec 31 2013 12:00AM"></ns0:EndDate> 
      </ns0:ContractPeriod> 
      <ns0:UnderwritingYear>Jan </ns0:UnderwritingYear> 
      <ns0:ContractSectionClass> 
       <ns0:JvClassOfBusiness>wind_storm_unspecified</ns0:JvClassOfBusiness> 
       <ns0:ClassOfBusinessDescription>wind_storm_unspecified</ns0:ClassOfBusinessDescription> 
      </ns0:ContractSectionClass> 
      <ns0:RiskLocation> 
       <ns0:Address> 
        <ns0:Country></ns0:Country> 
       </ns0:Address> 
       <ns0:Location> 
        <ns0:Supraentity></ns0:Supraentity> 
        <ns0:Country>BS</ns0:Country> 
       </ns0:Location> 
      </ns0:RiskLocation> 
      <ns0:PerilsIncluded> 
       <ns0:Peril> 
        <ns0:PerilType></ns0:PerilType> 
       </ns0:Peril> 
      </ns0:PerilsIncluded> 
      <ns0:ContractAmountsCurrency> 
       <ns0:Ccy>GBP</ns0:Ccy> 
      </ns0:ContractAmountsCurrency> 
      <ns0:BrokerSharePercentage> 
       <ns0:Rate RateUnit="percentage">2.500000</ns0:Rate> 
      </ns0:BrokerSharePercentage> 
      <ns0:OrderPercentage> 
       <ns0:Rate RateUnit="percentage">41.000000</ns0:Rate> 
      </ns0:OrderPercentage> 
      <ns0:Brokerage> 
       <ns0:BrokeragePercentage> 
        <ns0:Rate RateUnit="percentage">2.500000</ns0:Rate> 
       </ns0:BrokeragePercentage> 
      </ns0:Brokerage> 
      <ns0:ContractMarket> 
       <ns0:Reinsurer> 
        <ns0:Party> 
         <ns0:Id Agency="DUNS_dun_and_bradstreet">239195295</ns0:Id> 
        </ns0:Party> 
       </ns0:Reinsurer> 
       <ns0:ParticipantFunction>leader</ns0:ParticipantFunction> 
       <ns0:ReinsurerContractReference></ns0:ReinsurerContractReference> 
       <ns0:ReinsurerQuoteMaximumSharePercentage> 
        <ns0:Rate RateUnit="percentage">100.000000</ns0:Rate> 
       </ns0:ReinsurerQuoteMaximumSharePercentage> 
       <ns0:ReinsurerWrittenPercentage> 
        <ns0:Rate RateUnit="percentage">100.000000</ns0:Rate> 
       </ns0:ReinsurerWrittenPercentage> 
      </ns0:ContractMarket> 
     </ns0:ContractSection> 
    </ns0:Placing> 
</ns0:Root> 

預期的輸出:

<Root xmlns="http://somenamespace" xmlns="http://ac.namespace"> 
    <Placing xmlns="http://somenamespace" Sender="broker" Receiver="serviceprovider"> 
    <UUId>GUID</UUId> 
    <BrokerReference>2B3B8992-3185-48EE-A030-0F61EFF7C7EB</BrokerReference> 
    <ServiceProviderReference>16</ServiceProviderReference> 
    <PlacingStage>order</PlacingStage> 
    <PlacingTransactionFunction>signed_line_advice</PlacingTransactionFunction> 
    <TransactionReasonDescription /> 
    <Cedent> 
     <Party> 
     <Id Agency="DUNS_dun_and_bradstreet" >292320710</Id> 
     <Name>Bahamas First General Insurance Co/Aon Benfield Canada</Name> 
     </Party> 
    </Cedent> 
    <Reinsurer> 
     <Party> 
     <Id Agency="" /> 
     <Name>RI3K</Name> 
     </Party> 
     <Contact> 
     <PersonName>test</PersonName> 
     <Email>[email protected]</Email> 
     </Contact> 
    </Reinsurer> 
    <Broker> 
     <Party> 
     <Id Agency="DUNS_dun_and_bradstreet">292320710</Id> 
     <Name>Aon Benfield UK</Name> 
     </Party> 
     <Contact> 
     <PersonName>Jenny Edwards</PersonName> 
     <Telephone>reinsurance_contract</Telephone> 
     <Email>[email protected]</Email> 
     </Contact> 
    </Broker> 
    <ServiceProvider> 
     <Party> 
     <Id Agency="DUNS_dun_and_bradstreet">239195295</Id> 
     </Party> 
    </ServiceProvider> 
    <Contract> 
     <ContractName>FINCO QUOTA SHARE TREATY</ContractName> 
     <ContractGroupName>BFG FINCO QUOTA SHARE TREATY</ContractGroupName> 
     <ContractType>0</ContractType> 
     <BrokerReference>B110813BDO1053</BrokerReference> 
     <BrokerGroupReference>200153436</BrokerGroupReference> 
     <BrokerRiskReference>13BDO1053</BrokerRiskReference> 
    </Contract> 
    <Endorsement> 
     <EndorsementReference>0</EndorsementReference> 
    </Endorsement> 
    <ContractSection ContractReportingLevel="section_level"> 
     <HighLevelReference>01</HighLevelReference> 
     <CoverType>quota_share</CoverType> 
     <ContractPeriod> 
     <StartDate DateIndicator="Jan 1 2013 12:00AM" /> 
     <EndDate DateIndicator="Dec 31 2013 12:00AM" /> 
     </ContractPeriod> 
     <UnderwritingYear>Jan </UnderwritingYear> 
     <ContractSectionClass> 
     <JvClassOfBusiness>wind_storm_unspecified</JvClassOfBusiness> 
     <ClassOfBusinessDescription>wind_storm_unspecified</ClassOfBusinessDescription> 
     </ContractSectionClass> 
     <RiskLocation> 
     <Address> 
      <Country /> 
     </Address> 
     <Location> 
      <Country>BS</Country> 
     </Location> 
     </RiskLocation> 
     <ContractAmountsCurrency> 
     <Ccy>GBP</Ccy> 
     </ContractAmountsCurrency> 
     <BrokerSharePercentage> 
     <Rate RateUnit="percentage">2.500000</Rate> 
     </BrokerSharePercentage> 
     <OrderPercentage > 
     <Rate RateUnit="percentage">41.000000</Rate> 
     </OrderPercentage> 
     <LinesPercentageOfOrderIndicator>false</LinesPercentageOfOrderIndicator> 
     <Brokerage> 
     <BrokeragePercentage> 
      <Rate RateUnit="percentage">2.500000</Rate> 
     </BrokeragePercentage> 
     </Brokerage> 
     <ContractMarket> 
     <Reinsurer> 
      <Party> 
      <Id Agency="DUNS_dun_and_bradstreet">239195295</Id> 
      </Party> 
     </Reinsurer> 
     <ParticipantFunction>leader</ParticipantFunction> 
     <ReinsurerQuoteMaximumSharePercentage> 
      <Rate RateUnit="percentage">100.000000</Rate> 
     </ReinsurerQuoteMaximumSharePercentage> 
     <ReinsurerWrittenPercentage> 
      <Rate RateUnit="percentage">100.000000</Rate> 
     </ReinsurerWrittenPercentage> 
     </ContractMarket> 
    </ContractSection> 
    </Placing> 
</Root> 
+0

這是正確的預期產出? Root沒有命名空間,它下面有一切。我想你會希望Root在同一個命名空間中。 – JLRishe

+0

@JLRishe:是的,你是對的。我只需要Root和Placing元素中的名稱空間。然而,在根中我需要其中的2個,並且在小孩(配售)中我只需要一個。我已經更新了預期的輸出。 – JohnXsl

回答

0

這XSLT做什麼,我想實際上是試圖做(即把一切都在最初的命名空間,而不是從它排除根):

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
    xmlns:ns0="http://somenamespace" 
    xmlns="http://somenamespace" 
    xmlns:ac="http://ac.namespace" 
    exclude-result-prefixes="ns0 msxsl ac"> 
    <xsl:strip-space elements="*" /> 
    <xsl:output method="xml" indent="yes" 
       omit-xml-declaration="yes" encoding="utf-8"/> 

    <xsl:template match="node() | @*"> 
    <xsl:copy> 
     <xsl:apply-templates select="node() | @*" /> 
    </xsl:copy> 
    </xsl:template> 


    <xsl:template match="node()" priority="-2"> 
    <xsl:copy> 
     <xsl:apply-templates/> 
    </xsl:copy> 
    </xsl:template> 

    <xsl:template match="*" name="CopyElement"> 
    <xsl:element name="{local-name()}" namespace="{namespace-uri()}"> 
     <xsl:apply-templates select="@*|node()"/> 
    </xsl:element> 
    </xsl:template> 

    <xsl:template match="@*"> 
    <xsl:attribute name="{local-name()}"> 
     <xsl:value-of select="."/> 
    </xsl:attribute> 
    </xsl:template> 

    <!--<xsl:template match="@*[local-name(.)='ns0']"/>--> 

    <xsl:template match="ns0:Cedent/ns0:Party/ns0:Id[. = '']"> 
    <xsl:element name="{local-name()}" namespace="{namespace-uri()}"> 
     <xsl:apply-templates select="@*" /> 
     <xsl:apply-templates 
      select="../../following-sibling::ns0:Broker[1]/ns0:Party/ns0:Id/node()" /> 
    </xsl:element> 
    </xsl:template> 

    <xsl:template match="ns0:Cedent/ns0:Party/ns0:Id/@Agency[. = '']"> 
    <xsl:attribute name="Agency">DUNS_dun_and_bradstreet</xsl:attribute> 
    </xsl:template> 

    <xsl:template match="ns0:Reinsurer[not(ns0:Party/ns0:Id and ns0:Party/ns0:Id/@Agency)]" /> 

    <xsl:template match="ns0:Reinsurer/ns0:Contact[not(ns0:PersonName)]" /> 

    <xsl:template match="ns0:Reinsurer/ns0:Contact/*[not(node())]" /> 

    <xsl:template match="ns0:Broker/ns0:Contact/ns0:Telephone[.='']" /> 

    <xsl:template match="ns0:ServiceProvider[. = '6']" /> 

    <xsl:template match="ns0:ServiceProvider[not(ns0:Party/ns0:Id and ns0:Party/ns0:Id/@Agency)]" /> 

    <xsl:template match="ns0:Contract/ns0:ContractGroupName[not(node())]" /> 

    <xsl:template match="ns0:Endorsement[ns0:Placing/ns0:PlacingStage = 'endorsement']" /> 

    <xsl:template match="ns0:Endorsement/ns0:EndorsementReference[not(node())]" /> 

    <xsl:template match="ns0:Endorsement/ns0:EndorsementName[not(node())]" /> 

    <xsl:template match="ns0:Endorsement/ns0:Description[not(node())]" /> 

    <xsl:template match="ns0:Endorsement/ns0:EffectiveDate[not(node())]" /> 

    <xsl:template match="ns0:ContractSection/ns0:BrokerSharePercentage[not(node()) and ns0:ContractSection/ns0:BrokerSharePercentage/ns0:Rate > 0]" /> 

    <xsl:template match="ns0:ContractSection/ns0:RiskLocation[not(node()) or (ns0:PlacingTransactionFunction = 'request_for_line_or_binder' or ns0:PlacingTransactionFunction = 'signed_line_advice' or ns0:PlacingTransactionFunction = 'quotation_request' or ns0:PlacingTransactionFunction = 'endorsement_request')]" /> 

    <xsl:template match="ns0:ContractSection/ns0:RiskLocation/ns0:Location/ns0:Supraentity[not(node())]" /> 

    <xsl:template match="ns0:ContractSection/ns0:RiskLocation/ns0:Location/ns0:Country[not(node())]" /> 

    <xsl:template match="ns0:ContractSection/ns0:PerilsIncluded[not(ns0:Peril/ns0:PerilType !='')]" /> 

    <xsl:template match="ns0:OrderPercentage"> 
    <xsl:call-template name="CopyElement" /> 
    <LinesPercentageOfOrderIndicator> 
     <xsl:value-of select="ancestor::ns0:Placing/ns0:PlacingTransactionFunction = 'signed_line_advice' and ns0:Rate > 100"/> 
    </LinesPercentageOfOrderIndicator> 
    </xsl:template> 

    <xsl:template match="ns0:ContractSection/ns0:Brokerage[descendant::ns0:Rate = '' and not(ns0:ContractSection/ns0:BrokeragePercentage/ns0:Rate > 0)]" /> 

    <xsl:template match="ns0:ContractSection/ns0:ContractMarket/ns0:Reinsurer[descendant::ns0:Id = '' and not(ns0:Party/ns0:Id/@Agency[. != ''])]" /> 

    <xsl:template match="ns0:ContractSection/ns0:ContractMarket/ns0:ReinsurerContractReference[not(node())]" /> 

    <xsl:template match="ns0:ContractSection/ns0:ContractMarket/ns0:ReinsurerQuoteMaximumSharePercentage[descendant::ns0:Rate = '']" /> 

    <xsl:template match="ns0:ContractSection/ns0:ContractMarket/ns0:ReinsurerWrittenPercentage[descendant::ns0:Rate = '' and ns0:PlacingTransactionFunction = 'signed_line_advice']" /> 

</xsl:stylesheet> 

當你的樣品輸入運行,其結果是:

<Root xmlns="http://somenamespace"> 
    <Placing Sender="broker" Receiver="serviceprovider"> 
    <UUId>GUID</UUId> 
    <BrokerReference>2B3B8992-3185-48EE-A030-0F61EFF7C7EB</BrokerReference> 
    <ServiceProviderReference>16</ServiceProviderReference> 
    <PlacingStage>order</PlacingStage> 
    <PlacingTransactionFunction>signed_line_advice</PlacingTransactionFunction> 
    <TransactionReasonDescription /> 
    <Cedent> 
     <Party> 
     <Id Agency="DUNS_dun_and_bradstreet">292320710</Id> 
     <Name>Bahamas First General Insurance Co/Aon Benfield Canada</Name> 
     </Party> 
    </Cedent> 
    <Reinsurer> 
     <Party> 
     <Id Agency="" /> 
     <Name>RI3K</Name> 
     </Party> 
     <Contact> 
     <PersonName>test</PersonName> 
     <Email>[email protected]</Email> 
     </Contact> 
    </Reinsurer> 
    <Broker> 
     <Party> 
     <Id Agency="DUNS_dun_and_bradstreet">292320710</Id> 
     <Name>Aon Benfield UK</Name> 
     </Party> 
     <Contact> 
     <PersonName>Jenny Edwards</PersonName> 
     <Telephone>reinsurance_contract</Telephone> 
     <Email>[email protected]</Email> 
     </Contact> 
    </Broker> 
    <ServiceProvider> 
     <Party> 
     <Id Agency="DUNS_dun_and_bradstreet">239195295</Id> 
     </Party> 
    </ServiceProvider> 
    <Contract> 
     <ContractName>FINCO QUOTA SHARE TREATY</ContractName> 
     <ContractGroupName>BFG FINCO QUOTA SHARE TREATY</ContractGroupName> 
     <ContractType>0</ContractType> 
     <BrokerReference>B110813BDO1053</BrokerReference> 
     <BrokerGroupReference>200153436</BrokerGroupReference> 
     <BrokerRiskReference>13BDO1053</BrokerRiskReference> 
    </Contract> 
    <Endorsement> 
     <EndorsementReference>0</EndorsementReference> 
    </Endorsement> 
    <ContractSection ContractReportingLevel="section_level"> 
     <HighLevelReference>01</HighLevelReference> 
     <CoverType>quota_share</CoverType> 
     <ContractPeriod> 
     <StartDate DateIndicator="Jan 1 2013 12:00AM" /> 
     <EndDate DateIndicator="Dec 31 2013 12:00AM" /> 
     </ContractPeriod> 
     <UnderwritingYear>Jan </UnderwritingYear> 
     <ContractSectionClass> 
     <JvClassOfBusiness>wind_storm_unspecified</JvClassOfBusiness> 
     <ClassOfBusinessDescription>wind_storm_unspecified</ClassOfBusinessDescription> 
     </ContractSectionClass> 
     <RiskLocation> 
     <Address> 
      <Country /> 
     </Address> 
     <Location> 
      <Country>BS</Country> 
     </Location> 
     </RiskLocation> 
     <ContractAmountsCurrency> 
     <Ccy>GBP</Ccy> 
     </ContractAmountsCurrency> 
     <BrokerSharePercentage> 
     <Rate RateUnit="percentage">2.500000</Rate> 
     </BrokerSharePercentage> 
     <OrderPercentage> 
     <Rate RateUnit="percentage">41.000000</Rate> 
     </OrderPercentage> 
     <LinesPercentageOfOrderIndicator>false</LinesPercentageOfOrderIndicator> 
     <Brokerage> 
     <BrokeragePercentage> 
      <Rate RateUnit="percentage">2.500000</Rate> 
     </BrokeragePercentage> 
     </Brokerage> 
     <ContractMarket> 
     <Reinsurer> 
      <Party> 
      <Id Agency="DUNS_dun_and_bradstreet">239195295</Id> 
      </Party> 
     </Reinsurer> 
     <ParticipantFunction>leader</ParticipantFunction> 
     <ReinsurerQuoteMaximumSharePercentage> 
      <Rate RateUnit="percentage">100.000000</Rate> 
     </ReinsurerQuoteMaximumSharePercentage> 
     <ReinsurerWrittenPercentage> 
      <Rate RateUnit="percentage">100.000000</Rate> 
     </ReinsurerWrittenPercentage> 
     </ContractMarket> 
    </ContractSection> 
    </Placing> 
</Root> 

請告訴我,如果你是真的想排除來自命名空間的Root

+0

jlRishe。感謝您的幫助,但它不起作用我仍然在輸出中看到命名空間和前綴。例如在輸出中,我在Cedent/Party/Id中看到它 292320710巴哈馬第一普通保險公司/ Aon Benfield加拿大 JohnXsl