Promoting Schema element error

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Promoting Schema element error

Viewing 1 reply thread
  • Author
    Posts
    • #21930

      I have been given a schema which I am having difficulty promoting elements from.

      The whole schema has a naming convention as below, where the name contains a dash, or multiple dashes.

       <xs:element  name=”Source-id“ type=”xs:string“ />

       

      When you promote the above element, and then try to utilize that property in an orchestration using a decide node, the expression editor will not accept the promoted property as valid as it get confused with the ‘-‘ in Source-ID

      e.g QofDATFile.Submission.Source-id == “ABC”

      Will result in errors :-

      Identifiers ‘source’ does not exist in …

      Identifiers ‘id’ does not exist in….

      The ‘-‘ is being treated as a minus sign. Is there a way to rename the promoted property to ‘SourceID’?

      I am obviously not able to modify the original schema as it is a third partys schema.

      I could create a transform to map the invalid schema elements to something simpler, but the schema is huge and I dont really want to do this.

      Any suggestions would be welcome.

      Regards

      Jon

       

       

    • #22450

      You could use the built-in xpath function to set the value of any element. You could find more information here:  http://msdn2.microsoft.com/en-us/library/aa561906.aspx 

      • #22451

        When you are specifying Distinguished Fields you are unable to modify the name.
        You can use promoted properties instead.
        1. Create a property schema and define a property called SourceID
        2. In the schema promote the property and specify your property schema and link the <source-id> node to the SourceID property
        3. Assign a value:   QofDATFile(MyProperties.SourceID) == “ABC”

        Alternatively you can follow Guo Ming Li’s suggestion of using the xpath function

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.