XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Need some advice from an XML expert

Hi Jason

It might be that

<?xml version="1.0" encoding="utf-8"?>
<WireTransfers xmlns="dsTransaction">
     <WireTransfer>
          <Value_Date>2007-02-15</Value_Date>
          <Amount>22222.33</Amount>
          <Bank_Action>R</Bank_Action>
          <Date_Blocked_Rejected>2007-02-15</Date_Blocked_Rejected>
          <Wire_Transfer_Transaction_Type>Bank to
Bank</Wire_Transfer_Transaction_Type>
           <other elements>
     </WireTransfer>
</WireTransfers>

will work - just need that xmlns="dsTransaction" at the top (maybe
add the schemaLocation too - example needs some correcting here)

can't say for sure without seeing the schema though but some of the
namespaces seem to be for the datatypes which probably don't need
to be included in the xml files

you'd probably want to tidy up the schema a fair bit too - looks like it
was generated and maybe not optimally for your purposes

All the best

Stephen Green


>>> "J Siatkowski" <jason.siatkowski@gmail.com> 20/03/07 15:55:43 >>>
I've done a lot of reading lately about XML as I've never really had
to work with it, but I've been tasked with developing an XML upload
for the business I support. I'm really surprised at the complexities.

Currently, I have the XML upload completed and it's working with the
various test files that I've created. I developed an XML schema and I
load the test file into a dataset once it passes validation.

There are a couple of things that I don't like about it though, and
I'm wondering if I can make this process better.

For one, I'm not happy with the fact that the xml file needs so much
information regarding namespaces.

This is what the top section of my XML file looks like:

<?xml version="1.0" encoding="utf-8"?>
<n:Transactions
xmlns:n="dsTransaction"
xmlns:mstns="http://tempuri.org/dsTransaction.xsd";
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:codegen="urn:schemas-microsoft-com:xml-msprop"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance";
xs:schemaLocation="dsTransaction.xsd">

I don't see why the customers should have to include this stuff in their files.
They would need all those lines and then prefix all of their elements as below.
A single transaction sample is as follows:

<n:WireTransfers>
     <n:WireTransfer>
          <n:Value_Date>2007-02-15</n:Value_Date>
          <n:Amount>22222.33</n:Amount>
          <n:Bank_Action>R</n:Bank_Action>
          <n:Date_Blocked_Rejected>2007-02-15</n:Date_Blocked_Rejected>
          <n:Wire_Transfer_Transaction_Type>Bank to
Bank</n:Wire_Transfer_Transaction_Type>
           <other elements>
     </n:WireTransfer>
<n:/WireTransfers>

It seems to me that when the file is uploaded, I should be able to
validate the file against any schema I like. Does this sound right?
Could I take an XML file that looks like this:

<?xml version="1.0" encoding="utf-8"?>
<WireTransfers>
     <WireTransfer>
          <Value_Date>2007-02-15</Value_Date>
          <Amount>22222.33</Amount>
          <Bank_Action>R</Bank_Action>
          <Date_Blocked_Rejected>2007-02-15</Date_Blocked_Rejected>
          <Wire_Transfer_Transaction_Type>Bank to
Bank</Wire_Transfer_Transaction_Type>
           <other elements>
     </WireTransfer>
</WireTransfers>

And then validate it against my schema? I haven't been able to get a
sample file like that to work, so perhaps I'm wrong, but it seems like
a lot to require of the customers.

Thanks for any advice,
--Jason

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ 
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org 
subscribe: xml-dev-subscribe@lists.xml.org 
List archive: http://lists.xml.org/archives/xml-dev/ 
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php 


______________________________________________________________________
Please note the new simpler name for our website: http://www.bristol.gov.uk 

Our email addresses have also changed - visit http://www.bristol.gov.uk/bigchange for further details.

Sign-up for our email bulletin giving news, have-your-say  and event information at: http://www.bristol.gov.uk/newsdirect 



______________________________________________________________________
Please note the new simpler name for our website: http://www.bristol.gov.uk

Our email addresses have also changed - visit http://www.bristol.gov.uk/bigchange for further details.

Sign-up for our email bulletin giving news, have-your-say  and event information at: http://www.bristol.gov.uk/newsdirect 





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS