[xsd-users] Keep a xsd library small

Angelo Difino angelo at cedeo.net
Mon Apr 27 05:18:09 EDT 2009


Hi Boris and all,
I still keep working hard on the xsd-types of the schemes i've sent you 
on the 12nd of February.

I've some troubles since in the first release i forgot (me damn it! ;) ) 
to include the specifier "--generate-wildcard"
since i've several tags include the any-type. for example the DIDL.xsd 
include an any tag for the structured data
type:

didl.xsd -> StatementType ->  <element ref="didl-msx:Metadata"/>
didl-msx -> MetadataType -> StructuredDataType ->
        <sequence>
            <any namespace="##any" processContents="lax" minOccurs="0"/>
        </sequence>

when i need to simply assign (clone) an ItemType (that include the above 
structured data type)
i've a run-time xerces error on the wildcard-source.txx:

          // Get an implementation of the Load-Store (LS) interface.
          //
          xercesc::DOMImplementation* impl (
            xercesc::DOMImplementationRegistry::getDOMImplementation (ls));

          return xml::dom::auto_ptr<xercesc::DOMDocument> (
            impl->createDocument ());

Am I missing somethins ? I'm checking your documentation but i really 
wondering if now (that i've added the
"--generate-wildcard"), i need to implement / wrote some code some where 
to "help" xerces when it founds an any type...
(the error is throwed in a place that i cannot manage)

The code that throw the error is:

std::auto_ptr< DIDLType > tmp = DIDL(filename.c_str() , (validate ? 0 : 
xml_schema::flags::dont_validate) );
mxm_dataobject::schema::didl::ItemType& topelement = 
dynamic_cast<mxm_dataobject::schema::didl::ItemType&>(_didl->Item());
mxm_dataobject::schema::didl::ItemType secondelement=topelement;    (in 
a inner class)

Thank you very much for the attention,
Best regards,
Angelo

Boris Kolpackov wrote:
> Hi Angelo,
>
> Angelo Difino <angelo at cedeo.net> writes:
>
>   
>> Last question :) since the number of classes is quite big (about 800), 
>> I've decided to organize this source code in several subfolders, labelled
>> with the same name of the schema they belong to.
>>
>> I've wrote a batch file that simply move the files in the correct 
>> subfolder. Is there any way to automatize it (something like "--output-dir
>> dir", but for the different namespaces)?
>>     
>
> Take a look a the --type-file-regex and --type-file-regex-trace
> options in the XSD Compiler Command Line Manual:
>
> http://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml
>
> The first option allows you to specify regular expressions that
> are used to transform type names into file names. They are run
> on a string that includes the namespace. While you won't be able
> to automatically place such files into different directories with
> this approach, you can add a namespace-specific prefix to the files
> and maybe later move them into a directory corresponding to the
> namespace with a simple(r) script.
>
>
>   
>> I've included in attach an example ...
>>     
>
> You attachment is in the RAR format. Please see item #5 in the 
> Posting Guidelines regarding this:
>
> http://www.codesynthesis.com/support/posting-guidelines.xhtml
>
> Boris
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.0.237 / Virus Database: 270.11.8/1987 - Release Date: 03/06/09 07:20:00
>
>   




More information about the xsd-users mailing list