Skip to content

Commit

Permalink
Merge branch 'FixElementRef' of https://github.com/LokiMidgard/XmlSch…
Browse files Browse the repository at this point in the history
…emaClassGenerator into LokiMidgard-FixElementRef
  • Loading branch information
Michael Ganss committed May 23, 2017
2 parents 98e06e6 + 1ede289 commit 93bcb1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions XmlSchemaClassGenerator/TypeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -924,13 +924,13 @@ private IEnumerable<CodeAttributeDeclaration> GetAttributes(bool isArray)

foreach (var attribute in attributes)
{
if (Form == XmlSchemaForm.Qualified)
if (XmlNamespace != null)
{
attribute.Arguments.Add(new CodeAttributeArgument("Namespace", new CodePrimitiveExpression(OwningType.XmlSchemaName.Namespace)));
attribute.Arguments.Add(new CodeAttributeArgument("Namespace", new CodePrimitiveExpression(XmlNamespace)));
}
else if (XmlNamespace != null)
else if (Form == XmlSchemaForm.Qualified)
{
attribute.Arguments.Add(new CodeAttributeArgument("Namespace", new CodePrimitiveExpression(XmlNamespace)));
attribute.Arguments.Add(new CodeAttributeArgument("Namespace", new CodePrimitiveExpression(OwningType.XmlSchemaName.Namespace)));
}
else if (!IsAny)
{
Expand Down

0 comments on commit 93bcb1d

Please sign in to comment.