Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to generate xsd with (string-length restrictions) from a PDM ?

87 views
Skip to first unread message

Torsten Reichert

unread,
Jan 21, 2015, 12:03:46 PM1/21/15
to
The transformation from PDM via "Tools | Generate XML-Model" and in that XML-Model "Language | Generate XML Schema Definition ..." to XSD is directly available in PowerDesigner.

How to modify the transformation rules at "Tools | Ressources | XML-Languages" for XSD-generation from an XML-Model is obvious, but the transformation is done on an XML-model already, so the length information is lost in the transformation from PDM to XML-Model before.

So the length information from the initial source model - the PDM - cannot be found of course as the marker ??????? points out.

See ??????? in the template code for
XML Schema Definition (WMDL)::Profile\Element\Templates\itemDecl
below:
______

.if (%TypeName%==%xsdPrefix%string)
<%xsdPrefix%element[ id="%ID%"][ name="%Code%"][%Abstract%?abstract="%.L:Abstract%"][ block="%Block%"][default="%DefaultValue%"][ final="%Final%"][ fixed="%FixedValue%"][form="%Form%"][%isMaxOccursRedefined%? maxOccurs="%MaxOccurs%"][%isMinOccursRedefined%?minOccurs="%MinOccurs%"][%Nillable%?nillable="%.L:Nillable%"][ref="%ReferenceName%"][substitutionGroup="%SubstitutionName%"][%extendedAttributesDecl%]/>

<%xsdPrefix%simpleType>
<%xsdPrefix%restriction base="%xsdPrefix%string">
<%xsdPrefix%length value=??????? />
%elementsDecl%
</%xsdPrefix%restriction>
</%xsdPrefix%simpleType>
.endif
______


So the question "How to generate xsd (string-length restrictions) from a PDM ?" leads to
-> How does the user modify or define the transformation rules for "Tools | Generate XML-Model" ?
0 new messages