[ http://jira.andromda.org/browse/XMLSCHEMA-1?page=history ]

Angel Pizarro updated XMLSCHEMA-1:
----------------------------------

    Attachment: XmlSchema.vsl

Attahed the VSL file to issue. 

> improved XmlSchema.vsl template
> -------------------------------
>
>          Key: XMLSCHEMA-1
>          URL: http://jira.andromda.org/browse/XMLSCHEMA-1
>      Project: XML Schema Cartridge
>         Type: Improvement
>     Reporter: Angel Pizarro
>     Assignee: Chad Brandon
>  Attachments: XmlSchema.vsl
>
> Augmented the template to handle generalizations and package structure for 
> global complexTypes.
> Warning: All classes are added as a global element with the proper 
> complexType, so that any name clashes across packages will result in type 
> over-riding or type clash, don't know which.
> Warning: This template does not handle the enumeration type.
> <?xml version="1.0" encoding="$xmlEncoding"?>
> <!-- 
>     Attention: Generated code! Do not modify by hand!
>     Generated by: andromda-xmlschema-cartridge
>   -->
> <xsd:schema 
>     targetNamespace="$namespace"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
>     xmlns:fuge="$namespace"
>     elementFormDefault="qualified">
> #foreach ($type in $types)
> #set ($typeName = "${type.fullyQualifiedName}Type")
>   <xsd:complexType name="$typeName">
> #if ($type.generalization) 
>     <xsd:complexContent>
>      <xsd:extension base="fuge:${type.generalization.fullyQualifiedName}Type" 
> >
> #end
> #set( $doSeq = true)
> #if ($type.associationEnds)
> #foreach ($associationEnd in $type.associationEnds) 
> #set ($otherEnd = $associationEnd.otherEnd)
> #if ($otherEnd.navigable)
>   #if ($doSeq) 
>    <xsd:sequence>
>     #set ($doSeq = false)
>   #end
>         <xsd:element name="${otherEnd.name}" 
> minOccurs="${otherEnd.minOccurs}" maxOccurs="1">
>          <xsd:complexType>
>           <xsd:sequence> 
>            <xsd:element name="${otherEnd.type.name}" 
> type="fuge:${otherEnd.type.fullyQualifiedName}Type" minOccurs="1" 
> maxOccurs="${otherEnd.maxOccurs}"/>
>           </xsd:sequence>
>          </xsd:complexType>
>         </xsd:element>      
> #end
> #end
> #foreach ($attribute in $type.attributes) 
> #if (!$attribute.xsdAttribute)
>   #if ($doSeq) 
>       <xsd:sequence>
>     #set ($doSeq = false)
>   #end
>          <xsd:element name="${attribute.name}" 
> type="xsd:${attribute.type.fullyQualifiedName}" 
> minOccurs="$attribute.minOccurs" maxOccurs="$attribute.maxOccurs"/>
> #end
> #end
> #if (!$doSeq) 
>     </xsd:sequence> 
> #set ($doSeq = true)
> #end
> #end
> #if ($type.generalization) 
>     </xsd:extension>
>     </xsd:complexContent>
> #end
> #foreach  ($attribute in $type.attributes)
> #if ($attribute.xsdAttribute)
>     <xsd:attribute name="${attribute.name}"
> #if($attribute.required) 
>      use="required" 
> #end 
>      type="xsd:${attribute.type.fullyQualifiedName}"/>
> #end
> #end
>   </xsd:complexType>
> #end
> #foreach ($element in $types)
> #set ($typeName = "${element.fullyQualifiedName}Type")
>  <xsd:element name="$element.name" type="fuge:$typeName" />
> #end
> </xsd:schema>     

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to