Tuesday, February 14, 2012

Biztalk Promoted Fields in SQL Schema

Now I promoted some fields in Biztalk which adds "comments" in an
<annotation> tag as shown below.
<xs:element name="Hipaa30TradingTestInclude">
<xs:annotation>
<xs:appinfo>
<b:properties>
<b:property name="ns0:__Name"
xpath="/*[local-name()='Hipaa30TradingTestInclude' and
namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-name
()='TradingPartnerCommon'
and
namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='Na
me' and namespace-uri()='']" />
<b:property name="ns0:City"
xpath="/*[local-name()='Hipaa30TradingTestInclude' and
namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-name
()='TradingPartnerCommon'
and
namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='Ci
ty' and namespace-uri()='']" />
<b:property name="ns0:State"
xpath="/*[local-name()='Hipaa30TradingTestInclude' and
namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-name
()='TradingPartnerCommon'
and
namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='St
ate' and namespace-uri()='']" />
<b:property name="ns0:Zip"
xpath="/*[local-name()='Hipaa30TradingTestInclude' and
namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-name
()='TradingPartnerCommon'
and
namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='Zi
p' and namespace-uri()='']" />
<b:property name="ns0:PrimaryContact"
xpath="/*[local-name()='Hipaa30TradingTestInclude' and
namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-name
()='TradingPartnerCommon'
and
namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='Pr
imaryContact' and namespace-uri()='']" />
</b:properties>
</xs:appinfo>
</xs:annotation>
I have five "promoted fields" and i got the following error five times.
Msg 102, Level 15, State 1, Line 49
Incorrect syntax near 'Hipaa30TradingTestInclude'.
Msg 132, Level 15, State 1, Line 49
The label 'http' has already been declared. Label names must be unique
within a query batch or stored procedure.
Msg 132, Level 15, State 1, Line 50
The label 'http' has already been declared. Label names must be unique
within a query batch or stored procedure.
Msg 132, Level 15, State 1, Line 50
Seems like the parser should ignore anything in the <annotation> tag?
Of course, I can manually remove it, but I'm trying to plan ahead for how to
maintain this.
Thanks again,
Neal Walters
http://Biztalk-Training.comIf you're using a SQL string literal to insert your schemas, you need to
escape the single quotes anywhere they occur in the string by using double
quotes.
Cheers,
Bob
"Neal Walters" <NealWalters@.discussions.microsoft.com> wrote in message
news:ECD78F81-E1B2-42F3-8D3E-9D2987FB5031@.microsoft.com...
> Now I promoted some fields in Biztalk which adds "comments" in an
> <annotation> tag as shown below.
> <xs:element name="Hipaa30TradingTestInclude">
> <xs:annotation>
> <xs:appinfo>
> <b:properties>
> <b:property name="ns0:__Name"
> xpath="/*[local-name()='Hipaa30TradingTestInclude' and
> namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-na
me()='TradingPartnerCommon'
> and
> namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='
Name'
> and namespace-uri()='']" />
> <b:property name="ns0:City"
> xpath="/*[local-name()='Hipaa30TradingTestInclude' and
> namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-na
me()='TradingPartnerCommon'
> and
> namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='
City'
> and namespace-uri()='']" />
> <b:property name="ns0:State"
> xpath="/*[local-name()='Hipaa30TradingTestInclude' and
> namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-na
me()='TradingPartnerCommon'
> and
> namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='
State'
> and namespace-uri()='']" />
> <b:property name="ns0:Zip"
> xpath="/*[local-name()='Hipaa30TradingTestInclude' and
> namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-na
me()='TradingPartnerCommon'
> and
> namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='
Zip'
> and namespace-uri()='']" />
> <b:property name="ns0:PrimaryContact"
> xpath="/*[local-name()='Hipaa30TradingTestInclude' and
> namespace-uri()='http://TestSchemas.Hipaa30TradingTestInclude']/*[local-na
me()='TradingPartnerCommon'
> and
> namespace-uri()='http://TestSchemas.TradingParterCommon']/*[local-name()='
PrimaryContact'
> and namespace-uri()='']" />
> </b:properties>
> </xs:appinfo>
> </xs:annotation>
>
> I have five "promoted fields" and i got the following error five times.
> Msg 102, Level 15, State 1, Line 49
> Incorrect syntax near 'Hipaa30TradingTestInclude'.
> Msg 132, Level 15, State 1, Line 49
> The label 'http' has already been declared. Label names must be unique
> within a query batch or stored procedure.
> Msg 132, Level 15, State 1, Line 50
> The label 'http' has already been declared. Label names must be unique
> within a query batch or stored procedure.
> Msg 132, Level 15, State 1, Line 50
> Seems like the parser should ignore anything in the <annotation> tag?
> Of course, I can manually remove it, but I'm trying to plan ahead for how
> to
> maintain this.
>
> Thanks again,
> Neal Walters
> http://Biztalk-Training.com
>|||Also note that XML Schema collections will not preserve your annotations.
Put the schema also in your own table using the XML datatype if that is
important information.
Best regards
Michael
"Bob Beauchemin" <bobb_no_spam@.SQLskills.com> wrote in message
news:ewAdNfuMHHA.5064@.TK2MSFTNGP04.phx.gbl...
> If you're using a SQL string literal to insert your schemas, you need to
> escape the single quotes anywhere they occur in the string by using double
> quotes.
> Cheers,
> Bob
> "Neal Walters" <NealWalters@.discussions.microsoft.com> wrote in message
> news:ECD78F81-E1B2-42F3-8D3E-9D2987FB5031@.microsoft.com...
>

No comments:

Post a Comment