/******************************************************************************
 * Copyright (c) 2000-2021 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
 *
 * Contributors:
 *   Balasko, Jeno
 *   Raduly, Csaba
 *
 ******************************************************************************/
module NamespaceDef {


type record MyRecordType
{
    integer    field1,
    charstring field2
}
with {
    variant (field1) "namespace  as 'http://www.example.org/example1' prefix 'ns1'";
}


template  MyRecordType    MyTemplate  :=
{
    field1 := 3,
    field2 := "four"
}

/*
will be encoded as:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:MyRecordType xmlns:ns0='http://www.example.org/' xmlns:ns1='http://www.example.org/example1'>
<ns1:field1>3</ns1:field1>
<ns0:field2>four</ ns0:field2>
</ns0:MyRecordType>

*/

type record of MyRecordType NsRecords;

} with {
encode "XML";
variant /*(all , all.all )*/ "namespace as 'http://www.example.org/' prefix 'ns0'"
variant "elementFormQualified"
}
