Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3630688
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:18:07+00:00 2026-05-19T00:18:07+00:00

I have a map in BizTalk 2009 that is converting some data into an

  • 0

I have a map in BizTalk 2009 that is converting some data into an XML document to be sent on to another system. The target schema includes some elements with xml:lang attributes. BizTalk generates those as ns1:lang. The target system requires that the prefix xml be used.

Here is a simplified example to show what BizTalk is doing:

sample.xsd

<xs:schema targetNamespace="http://example.com/"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="common.xsd"
             namespace="http://www.w3.org/XML/1998/namespace" />
  <xs:element name="example">
    <xs:complexType>
      <xs:attribute ref="xml:lang" />
    </xs:complexType>
  </xs:element>
</xs:schema>

common.xsd

<xs:schema xmlns:xml="http://www.w3.org/XML/1998/namespace"
           targetNamespace="http://www.w3.org/XML/1998/namespace"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:attribute name="lang" type="xs:language" />
</xs:schema>

Example of map output

<ns0:example xmlns:ns0="http://example.com/"
             xmlns:ns1="http://www.w3.org/XML/1998/namespace"
             ns1:lang="en-US" />

Is there some way to convince BizTalk to use the xml prefix?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:18:08+00:00Added an answer on May 19, 2026 at 12:18 am

    As far as I know, there is no builtin way for achieving this.

    There are, however, two solutions that I can see:

    Use a Custom XML StyleSheet

    If you right-clik on the map and look carefully in the generated xsl stylesheet, you’ll see a XML namespace declaration like this:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:ns1="http://www.w3.org/XML/1998/namespace"
                    ...
                    >
    ...
    <xsl:attribute name="ns1:lang">
    ...
    

    This is the default behaviour of the BizTalk mapper and you cannot do anything about it. However, if you proceed to extract the generated XSLT and use this as the backend for your map, you can change this declaration to match the expected outcome.

    • First, copy the stylesheet to the location of your project.
    • Include this stylesheet as a file in your BizTalk project
    • Update the stylesheet, so that the namespace declaration and the matching attribute prefix are correct.

    The resulting xsl stylesheet looks like this:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:xml="http://www.w3.org/XML/1998/namespace"
                    ...
                    >
    ...
    <xsl:attribute name="xml:lang">
    ...
    

    Now you can use this custom stylesheet as a backend for the map.

    • In Visual Studio, open the map.
    • Click anywhere on a blank space in the BizTalk designer surface.
    • In the map properties, locate the Custom XSL Path and specify the location of your custom stylesheet.

    Custom BizTalk Mapper XSL Path

    Use a Custom Pipeline Component

    What you’re after is that the message is correct for your target recipient. So the idea is to change the offending namespace prefix as part of sending the message outside BizTalk. The transformation happens during the processing of the send pipeline.

    Nic Barden has blogged and provided some source code about this here. You can use his sample as the basis for performing replacement of namespace prefixes, rather than replacing namespaces themselves.

    I strongly encourage you to check out the whole series of posts he’s done about Developing Streaming Pipeline Components. Nic has made an extensive and thorough job of describing all that’s needed to author robust and enterprise-class pipeline components.

    • Part 1
    • Part 2
    • Part 3
    • Part 4
    • Part 5
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a map for my game, I have a script that on a
I want to have a map that has a homogeneous key type but heterogeneous
I have a Google Map that suddenly stopped working for no apparent reason (I
I have unsorted map of key value pairs. input = { xa => xavalue,
I have a Map which is to be modified by several threads concurrently. There
I have a map defined like this std::map<some_key_type, std::string::iterator> mIteratorMap; And a huge string
I have a map of a building and I'd like to programmatically highlight specific
Is there a way in Java to have a map where the type parameter
In C++, I have a map<string, string> , containing an unknown number of entries.
I have a site map of a few thoasand pages where the only different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.