I am just playing around with the import/export function and can happily create classes and suchlike. If I tick the export box to include tagged values then it exports an extra sheet with the tagged values on as expected. However it does not look like you can batch import values into the tagged values of a new class - I have tried to create classes, re-export and then use the ID rather than class name to try this - is it something that is supported?
As background:
I am trying to create about 350 new classes for a project; I have the class name, the documentation and a number of values to go into the tagged values of a class (the usual xml min, max, data type etc) along with any project notes or data sources for that particular data item. The ability to import would massively speed up the project (and save me from typing stuff )
Thanks for your post. Would it be the format of tagged values you have in Excel is incorrect so the tagged values are not imported to your project? Please refer to attached image for how to add tagged values in Excel file, and hopefully this help resolving your problem.
By the way, you do not need to add new model → import to project → export to Excel again to add tagged values, you can directly add new model in Excel and add tagged values for that new model in Tagged Values sheet at the same time.
By the way, we will investigate to optimize the format of tagged values in Excel for easy and effective modeling of tagged values. I’ll let you know if there is any news on this issue.
Thanks - its just a way to add additional documentation to the model - I can always stick it as a TaggedValue with the xs:annotation/xs:documentation as the Tag name…
Thanks for replying. I’ve passed the Comments issue to our engineers to follow-up. At the same time, I would like to let you know that we changed the format of tagged values in Excel, please update to latest patch (build sp1_20091118v or later) for the enhancement. More details about updating to latest patch from the following link:
By the way, only the tags with value will be imported. And when you want to add models to have tagged values, please also specify the ID of model (you can refer to attached image). Please feel free to ask if there is anything else we can help.
Slight problem; when I add additional tagged values they get generated in the xsd; this is not a problem as I can always use the xs:annotation/xs:documentation/MyName as the path (in the same way that we have xs:restriction@base and xs:restriction/xs:maxlength@value)
The problem is that xs:annotation can only appear once within the definition of a simple type/element.
The only way that I can see to resolve this is to put some logic into the generation; If TaggedValueName = xs:* then generate; Else DoNothing EndIf but this might be not where your engineers want to take the code…
Thanks for replying but I’m confused. Do you mean to ad tagged values in Excel for importing to project, then generate the tagged values to XSD code with Instant Generator? Would you mind to clarify your expectation and provide some samples for illustration? Thanks in advance!
One of the projects that I look after has created a very big excel spreadsheet with all attributes for an application. Within the spreadsheet they have the normal things like maxlength, minlength, data type, description etc. They also have a list of which data standards they have used for each attribute (as an example - Person Family Name is defined by the UK Government Data Standards catalogue).
What I am trying to do is use the excel import function to provide the normal TaggedValue that you would expect (the Max/Min lengths etc) and also to create some additional documentation (which data standard was used, what are the validation requirements, what notes are attached to the attribute).
The values that I am trying to use are:
Documentation
Synonyms
Min Chars
Max Chars
Validation Criteria
Questions Outstanding
Notes
I was hoping to use the TaggedValues to hold these additional metadata items and then to not generate them when creating the XSD’s. The current XSD generation generates ALL tagged values which leads to an incorrect xsd:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema
targetNamespace="http://untitled"
xmlns="http://untitled"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="Class">
<xs:annotation>
<xs:documentation>
this is a test
</xs:documentation>
</xs:annotation>
<Tag>
test
</Tag>
<Tag2>
test1
</Tag2>
<Tag3>
test2
</Tag3>
</xs:simpleType></xs:schema>
What I am trying to achieve is that the XSD generator looks for any tag that starts ‘xs:’ and then generates the output, if the tag starts with something other than ‘xs:’ then it is ignored.
I am not sure if this is just something that I want for this particular project or something which has a bigger use. In the interim I have created a spreadsheet that uses
to create paragraphs within the documentation for import so that this extra information is presented in a clear fashion.
If you think that my requirement is something that you want to adopt then I will happily help you in defining it and helping you implement it - However, I do know that it is a bit of a weird request…
Thanks for explaining the details. Your requirement can be fulfilled by customizing code template of Instant Generator for XSD (in VPSuite/resources/instantgenerator/xsd). I’ll ask our engineers to provide a sample code template for your reference.
Please first update your product to latest patch (sp1_20091125r or later) and then follow the attached image for customizing your code template in VPSuite/resources/instantgenerator/xsd/ for generate tags start with “xs:” in XSD. Please feel free to ask if you need further assistance.
I’m sorry about my late response about export Comments of element to Excel. We enhanced this so that you can check “Export Comments” (as shown as image).
This enhancement is available in latest patch build sp1_20091203d, please remember to update your software to latest patch. More details about update to latest patch can be found from: