SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Script Library
 sql 2008 and XML
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

thampl
Starting Member

2 Posts

Posted - 06/01/2010 :  11:34:25  Show Profile
I just can not get the part that is commented.
Please help :)

WITH XMLNAMESPACES (
'urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2' as cec,
'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2' as inv,
'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2' as cbc,
'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2' as cac
)

select ((
select
(select 'ID' = 'IDTEXT' ,
'InvoiceIssuePlaceData' as 'Name',
'xx' as 'ExtensionAgencyID',
'yy' as 'ExtensionAgencyName',
'urn:invoice:hr:issueplace' as 'ExtensionAgencyURI',
'xxxxx' as 'ExtensionAgencyURI',
'MandatoryField' as 'ExtensionReasonCode',
'text' as 'ExtensionReason',
'yyyyy' as 'ExtensionContent'
for xml raw('UBLExtension'), root ('UBLExtensions'), elements, type),

(select '2.0'
for xml raw (''), root('UBLVersionID'), elements, type),

(select 'urn:invoice.hr:ubl-2.0-customizations:SimpleInvoice'
for xml raw (''), root('CustomizationID'), elements, type)
for xml raw (''), root ('Invoice'), elements, type
) ) as sxml



/*

<inv:Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:inv="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2">

<cec:UBLExtensions>
<cec:UBLExtension>
<cbc:ID>IDTEXT</cbc:ID>
<cbc:Name>InvoiceIssuePlaceData</cbc:Name>
<cec:ExtensionAgencyID>xx</cec:ExtensionAgencyID>
<cec:ExtensionAgencyName>yy</cec:ExtensionAgencyName>
<cec:ExtensionAgencyURI>zz</cec:ExtensionAgencyURI>
<cec:ExtensionURI>urn:invoice:hr:issueplace</cec:ExtensionURI>
<cec:ExtensionReasonCode>MandatoryField</cec:ExtensionReasonCode>
<cec:ExtensionReason>text</cec:ExtensionReason>
<cec:ExtensionContent><ihi:IssuePlace xmlns:ihi="urn:invoice:hr:issueplace">Varadin</ihi:IssuePlace></cec:ExtensionContent>
</cec:UBLExtension>
</cec:UBLExtensions>
<cbc:UBLVersionID>2.0</cbc:UBLVersionID>
<cbc:CustomizationID>urn:invoice.hr:ubl-2.0-customizations:SimpleInvoice</cbc:CustomizationID>
</Invoice>


*/

robvolk
Most Valuable Yak

USA
15676 Posts

Posted - 06/01/2010 :  14:48:28  Show Profile  Visit robvolk's Homepage
Please do not cross post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=145410
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000