tags:

views:

23

answers:

2

Hi,

I am trying to generate a schema from this xml file:

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=xml&retmode=xml&db=nucleotide&id=AB573763

I store it as s.xml and then tried:

xsd s.xml

It just does not finish it - seems to be stuck in an endless loop or something. What other options do I have to generate the xsd or can you see something wrong?

Thanks.

Christian

A: 

You already have a DTD: http://www.ncbi.nlm.nih.gov/dtd/NCBI_Seqset.dtd

But... I tried VS2010: Menu: XML -> Create Schema and it did work.

Also I tried Altova XMLSpy: DTD/Schema -> Create DTD/Schema and it also did work. Maybe you can download an evaluation version of XMLSpy?

I have seen that generally VS2010 generates better schemas than XMLSpy. In this case, VS2010 generated 7500 lines and XMLSpy just 1296.

I couldn't attach here the generated schema as the lenght is more than maximum stackoverflow-post. (30000 chars)

Tuomas Hietanen
I only have VS 2008 - can I do the same there? Thanks.
csetzkorn
A: 

A schema generated from a single instance document is never going to be as high quality as one created from a schema as you can be almost certain that the generated schema will have distinct limitations.

I would suggest that you download the schema from the NIH (http://www.ncbi.nlm.nih.gov/dtd/NCBI_Seqset.dtd as @Tuomas Hietanen showed) and use a tool such as James Clark's Trang to generate a schema. Your resulting schema is likely to be of higher quality. If you have a copy of Oxygen you can simply use that as Trang is built-in.

Nic Gibson
Thanks - makes sense. That sounds interesting.
csetzkorn