XML Shema & Unique Particle Attribution

Hi all,
I am trying to create an xml schema but I face the following error:
cos-nonambig: "":content and "":content (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles. [65]
the above error is caused by the following section of the xsd file (specifically in the xs:choice of the question element definition):
    <xs:element name="content" type="xs:anyType"/>
    <xs:element name="weight" type="xs:positiveInteger"/>
    <xs:group name="simpleQuestionItems">
        <xs:sequence>
            <xs:element ref="content"/>
            <xs:element ref="weight"/>
        </xs:sequence>
    </xs:group>
    <xs:group name="complexQuestionItems">
        <xs:sequence>
            <xs:element ref="content" minOccurs="0" maxOccurs="1"/>
            <xs:element ref="weight" minOccurs="0" maxOccurs="1"/>
            <xs:element ref="question" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:group>
    <xs:element name="question">
        <xs:complexType>
            <xs:choice>
                <xs:group ref="simpleQuestionItems"/>
                <xs:group ref="complexQuestionItems"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>Do you know how can I avoid this problem while writing something similar?

Hello,
See i have made some changes accordingly but still there may be some problems. I dont know why you want your schema structure in circular one. (i.e. from question group you want to ref complex and again from it you are ref to question so it is giving name collision problem)
One another think do follow to mention the namespace (target and for your xsd) whenever you do your new xsd. Generally all project xsd's belong to only one namespace( but still as per your convience you can mention multiple)
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:ab="http://www.yourcompany.com/XMLSchema/ProjectName" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.yourcompany.com/XMLSchema/ProjectName" elementFormDefault="qualified" attributeFormDefault="unqualified">
     <!--<xs:element name="content" type="xs:anyType"/>
     <xs:element name="weight" type="xs:positiveInteger"/>-->
     <xs:group name="simpleQuestionItems">
          <xs:sequence>
               <xs:element name="content" type="xs:anyType"/>
               <xs:element name="weight" type="xs:positiveInteger"/>
               <!--<xs:element ref="ab:content"/>
               <xs:element ref="ab:weight"/>-->
          </xs:sequence>
     </xs:group>
     <xs:group name="complexQuestionItems">
          <xs:sequence>
               <!--<xs:element ref="ab:content" minOccurs="0"/>
               <xs:element ref="ab:weight" minOccurs="0"/>-->
               <xs:group ref="ab:simpleQuestionItems" minOccurs="0"/>
               <xs:element ref="ab:question" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:group>
     <xs:element name="question">
          <xs:complexType>
               <xs:choice>
                    <xs:group ref="ab:simpleQuestionItems"/>
                    <xs:group ref="ab:complexQuestionItems"/>
               </xs:choice>
          </xs:complexType>
     </xs:element>
</xs:schema>
Regards,
Sachin Kulkarni, Pune- India

Similar Messages

  • Cos-nonambig in xsd:choice group 'Unique Particle Attribution'

    Hello forum.
    I've following XSD specification:
    <?xml version="1.0" encoding="utf-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="data">
    <xsd:complexType>
    <xsd:choice>
    <xsd:group ref="elem1" />
    <xsd:group ref="elem2" />
    </xsd:choice>
    </xsd:complexType>
    </xsd:element>
    <xsd:group name="elem1">
    <xsd:sequence>
    <xsd:element name="order_no" type="order_no_type" />
    <xsd:element name="someAttributeElem1">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:pattern value="[^|=]*" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:group>
    <xsd:group name="elem2">
    <xsd:sequence>
    <xsd:element name="order_no" type="order_no_type" />
    <xsd:element name="someAttributeElem2" />
    </xsd:sequence>
    </xsd:group>
    <xsd:simpleType name="order_no_type">
    <xsd:restriction base="xsd:integer">
    <xsd:totalDigits value="8" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>
    on
    final SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    final Schema schema = factory.newSchema(xsd);
    i get the following exception
    org.xml.sax.SAXParseException: cos-nonambig: "":order_no and "":order_no (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
         at com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.reportSchemaError(XSConstraints.java:315)
         at com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.fullSchemaChecking(XSConstraints.java:463)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:530)
         at com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:206)
         at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:489)
         at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:505)
    Possibly this is related to the following bug?
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4996456
    So from my point of view reading the W3C Spec, in a choice the group is
    distinct. So we should be able to use it like i did.
    Is the an solution or workaround provided by JAVA init self or can anybody
    tell me how to find an solution in an other JAVA library. I didn't work XML
    validation that often, but in the past I did use some of the Apache
    Frameworks. But as I can see in the error discription, Apache is already
    involved.
    Attention:
    The original XSD is more complicatated and shared by different programms
    in different Languages, C#, .Net, Navision. So, if there is no error in
    the XSD which will be handled by the other frameworks less strict or
    leniant, it will be complicated for to me to argue, that we have to change
    the XSD so that we can handle it in Java.
    TIA
    Holger

    Possibly this is related to the following bug?
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4996456
    Actually, as I read that bug (and I haven't gone back to the XSD spec to verify), it seems to say that the behavior you want is actually not valid -- the bug is that it would accept the choice with common first element and shouldn't have.
    This seems to be the sort of lookahead problem that affects most grammars: you can't differentiate between two productions without reading one or more following symbols. Parser generators usually have a way to let you say "lookahead N tokens for this next production," but I don't believe XSD has anything like that. And I can't imagine that it would, as the structure of XML would require an essentially infinite lookahead.
    But as I can see in the error discription, Apache is already involved.Yeah, the Sun JDK embeds Xerces and Xalan. To my knowledge, these two have pretty much taken over the Java parsing/transform space; there were some others (such as JDom), but they have pretty much been abandoned in terms of active development.
    The original XSD is more complicatated and shared by different programms
    in different Languages, C#, .Net, Navision. So, if there is no error in
    the XSD which will be handled by the other frameworks less strict or
    leniant, it will be complicated for to me to argue, that we have to change
    the XSD so that we can handle it in Java.Well, you could simply point out that this is a case of Don't Repeat Yourself: if you have multiple complexTypes that share the same elements, that those elements should be extracted out into a common containing type.
    But I think, if you read the spec carefully, you'll find that such structures are not permitted by XSD.

  • JAXB binding compiler error "Unique Particle Attribution"

    I'm trying to compile an xsd but get an error:
    parsing a schema...
    [ERROR] cos-nonambig: "":SomeData and WC[##any] (or elements from their substitution group) violate "Unique Particle Attribution".
    line 4 of TestCase.xsd
    Failed to parse a schema.
    I've narrowed the error down to this test case:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
     &nbsp <xs:element name="AnElement" type="AnElementType"/>
     &nbsp <xs:complexType name="AnElementType">
       &nbsp <xs:sequence>
         &nbsp <xs:element name="SomeData" type="xs:string" minOccurs="0"/>
         &nbsp <xs:any minOccurs="0"/>
       &nbsp </xs:sequence>
     &nbsp </xs:complexType>
    </xs:schema>
    If I remove the 'minOccurs' from the 'SomeData' element, it compiles fine. Any ideas on why Sun's JAXB compiler doesn't like this xsd?
    Thanks,
    Josh

    Does modifying the schema remove the error?
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="AnElement" type="AnElementType"/>
    <xs:complexType name="AnElementType">
    <xs:choice>
    <xs:any minOccurs="0"/>
    <xs:sequence>
    <xs:element name="SomeData" type="xs:string" minOccurs="1"/>
    <xs:any minOccurs="0"/>
    </xs:sequence>
    </xs:choice>
    </xs:complexType>
    </xs:schema>
    thanks,
    Deepak

  • Validate  XML against  XML Shema while marshalling/Unmarshalling in JAXB?.

    Hi,
    Can i validate XML documents against XML Shema when i marshall/unmarshall the same using JAXB API?.
    Thanks

    Well, it is weird, but, the code below works when validating the NonEmptyString type:
    XmlSchemaSet schemaSet = new XmlSchemaSet();
    schemaSet.Add(null, "LogConfig.xsd");
    XDocument doc1 = XDocument.Load("LogConfig.xml");
    doc1.Validate(schemaSet, new ValidationEventHandler(ValidationCallBack), false);
    However, if I leave the <LogName> empty it does not valid the values set on xsd fixed attribute, 
    The solution?
    Well, I'm validating the same xml twice, the code above and the code on my first question.

  • Prob in XML shema validation

    HI All,
    I am getting error when I am trying to insert data into XML type coloumn by validating data using XML schema .Here I am giving the statement If any one of you faced the same problem can suggest what's the problem.
    insert into FND_DM_XDB_DOCUMENTS values(1, xmltype('<DocumentContent
    xmlns="http://www.oracle.com/FND_DM_XDB_DOC.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/FND_DM_XDB_DOC.xsd">
    <Name> Test1</Name>
    <Description> Test Desc </Description>
    <Type> "FOLDER" </Type>
    </DocumentContent>'))
    Thanks in advance,
    Cheers
    Somasekar

    First of all what is the error :))
    you need to post it for anybody to help you out.
    anyhow i can point out some small mistakes.
    Does your schema has targetNamespace.
    If yes then you need to modify the
    xsi:schemaLocation="http://www.oracle.com/FND_DM_XDB_DOC.xsd".
    xsi:schemaLocation should contain two things first is the targetNamespace followed by the unique url you used to register the xml schema in the database.
    incase your schema does not have targetNamespace then you have to modify
    xsi:schemaLocation="http://www.oracle.com/FND_DM_XDB_DOC.xsd"
    to
    xsi:noNamespaceSchemaLocation="http://www.oracle.com/FND_DM_XDB_DOC.xsd"
    good luck.

  • XML Shema for Oracle

    Hi Frnds,
    how to create our own Data Model for Oracle Data Base table.
    What SAP providing not full filling our requirement , so we need to create own data model, How to create Data Model for SAP Material or Oracle Data Base.
    What are condition i should follow before creating own Work flow.
    If anybody having step by step procedure or Document for Creating own data model share to me.
    Regards,
    Raj

    Hi Raja,
    As we have a XML schema for Idocs containing data extracted from R/3 systems eg MATMAS05 I do not think there is any such xml schema fro data coming from Oracle systems as the data from oracle are extracted in the from of flat files.
    If your data model is not matching with the standard business content then you need to create your own data model .
    Some steps to consider while building your data model are:
    - Consider which fields you need to be displayed when your are displaying a rec.
    - Which field values are set of legal values and can be used as lookups for the rec
    - If some records have multivalues and are dependent on other field values then use them as qualifiers.
    - Records which form a hierarchy can be used in hierarchy table.
    Follow the below links which will, guide you in the data modelling
    /people/dattatreya.kulkarni/blog/2007/01/19/sap-mdm--one-bite-at-a-time
    Hope it helps
    Kindly reward points if found useful
    Thanks
    SImona

  • How to avoid ORA-3113 when selecting from XMLTYPE table

    Hi,
    If I register an XML-schema, Oracle automatically creates a table xxxxxx_tab of XMLTYPE. (I use Oracle 9.2.0.1)
    When I do a DESCRIBE or a SELECT from this table I get the error: 'ORA-03113:
    end-of-file on communication channel' and my connection is dropped.
    I opened a TAR for this and Oracle says: 'It is an internal bug so cannot be viewed in metalink. This is fixed in release 10i.' (do they mean oracle DB rel 10i, or a new version of XDK?)
    I saw an example in Oracle Magazine (Jan
    2003) "Make XML Native and Relative" about Oracle 9i Rel 2 and XML. As you can see in codeListing 7, the author also does a select from such a
    table (CD331_tab): Why doesn't he have any problems?
    Is there a workaround for this bug? What's the purpose of being able to automatically upload XML-data to a registered schema if you can't do a select of the data?
    Thank you!

    It appears that the XML Schema is not entirely valid. Specifically, the definition of element "DeviceCategory" has two definitions of element "Audio" appearing within a <choice> model i.e. something like :
    <element name="DeviceCategory">
    <choice>
    <sequence>
    <element name="Audio">
    </sequence>
    <sequence>
    <element name="Audio">
    </sequence>
    </choice>
    This is disallowed by XML Schema spec per. the Unique Particle Attribution Constraint. The general idea is that a XML Schema describes a determinstic content model i.e. schema processor can always unambiguosly determine the matching declaration when it encounters an element. However that's not the case with the declaration above. On encoutering "Audio", it could match either the first or the second declaration of the element. Hence the error.
    You will have to rework the schema to avoid this constraint. One mechanism could be to define complexType and their restrictions.
    - Ravi

  • Exported ant script -- NoClassDefFound?

    I've exported ant script from workshop (wls9.2 eclipse) and I was able to build the app.war (web services) ok.
    However I saw message like this:
    "assembly: Imput fileset contained no files, nothing to do."
    And when I deployed the war to server and tried to access the webservices, it gave me NoClassDefFound error.
    Also I noticed that the ".staging" directory has empty "lib" dir under it.
    Does anyone know how to fix it?
    Here is the generated build.xml and workspace.xml.
    ========================= workspace.xml==============
    <?xml version="1.0" encoding="UTF-8"?>
    <node name="metadata">
    <node name="projects">
    <node name="billingservice">
    <attribute name="location" value="C:/home/rlee/projects/telepacific/billingservice"/>
    </node>
    </node>
    <node name="library-modules">
    <node name="library-module">
    <attribute name="location" value="%wl.home%/common/deployable-libraries/wls-commonslogging-bridge.war"/>
    </node>
    <node name="library-module">
    <attribute name="location" value="%wl.home%/common/deployable-libraries/weblogic-controls-1.0.war"/>
    </node>
    <node name="library-module">
    <attribute name="location" value="%wl.home%/common/deployable-libraries/beehive-controls-1.0.war"/>
    </node>
    </node>
    <node name="server-runtimes">
    <node name="BEA WebLogic v9.2">
    <attribute name="location" value="%wl.home%"/>
    </node>
    </node>
    <node name="vm-locations">
    <attribute name="defaultVM" value="C:/bea/wls922/jdk150_10"/>
    <node name="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/BEA WebLogic v9.2 JRE">
    <attribute name="location" value="c:/bea/wls922/jrockit90_150_10"/>
    </node>
    </node>
    <node name="classpath-vars">
    <node name="SDKS_HOME">
    <attribute name="value" value="c:/home/rlee/projects/mpower/sdks"/>
    </node>
    <node name="WEBLOGIC_HOME">
    <attribute name="value" value="%wl.home%"/>
    </node>
    </node>
    </node>
    ======================= end of workspace.xml==============
    ==================== exported build.xml ====================
    <project default="build">
    <description>
    Project build script. All public targets require the "workspace" property to be
    set at invocation. It can either point at the Eclipse workspace directory that
    this project belongs to or an exported workspace.xml file. The wl.home property
    may also need to be specified unless WL_HOME environment variable is defined.
    </description>
    <target name="init.env" unless="init.env.executed">
    <property name="init.env.executed" value="true"/>
    <property environment="env"/>
    <condition property="wl.home" value="${env.WL_HOME}">
    <isset property="env.WL_HOME"/>
    </condition>
    <fail unless="wl.home" message="The wl.home property needs to be set!"/>
    </target>
    <target name="init.typedefs" depends="init.env" unless="init.typedefs.executed">
    <property name="init.typedefs.executed" value="true"/>
    <typedef resource="com/bea/wlw/antlib/antlib.xml">
    <classpath>
    <fileset dir="${wl.home}">
    <include name="workshop/lib/wlw-antlib.jar"/>
    <include name="workshop/lib/wlw-util.jar"/>
    <include name="workshop/lib/wlw-libmodules.jar"/>
    <include name="workshop/lib/wlw-splitsrc.jar"/>
    <include name="server/lib/ant/ant-contrib-1.0b1.jar"/>
    </fileset>
    </classpath>
    </typedef>
    </target>
    <target name="init" depends="init.env,init.typedefs" unless="init.executed">
    <property name="init.executed" value="true"/>
    <fail unless="workspace" message="The workspace property needs to be set!"/>
    <dirname property="project.dir" file="${ant.file}"/>
    <property name="echo.metadata" value="false"/>
    <mdimport workspace="${workspace}" pjdir="${project.dir}" echo="${echo.metadata}">
    <option name="skipAnnotationProcessors" value="com.bea.wlw.webservices.core"/>
    </mdimport>
    <property name="archive.name" value="${project.name}.war"/>
    <property name="uri" value="${archive.name}"/>
    <taskdef name="xmlbean"
    classname="org.apache.xmlbeans.impl.tool.XMLBean">
    <classpath>
    <pathelement path="${wl.home}/common/lib/apache_xbean.jar"/>
    <pathelement path="${wl.home}/common/eclipse/plugins/com.bea.eclipse.common.lib.apache_xbean2/jsr173_api.jar"/>
    </classpath>
    </taskdef>
    <property name="generated.module.root" value="${project.dir}/build/weboutput"/>
    <property name="assembly.src" value="${project.dir}/build/assembly/.src"/>
    </target>
    <target name="build" depends="init" description=" compiles the source files; does not package the results">
    <for list="0,1,2,3,4,5,6,7,8,9" param="i">
    <sequential>
    <if>
    <and>
    <isset property="xbean.src.@{i}.dir"/>
    <available file="${xbean.src.@{i}.dir}"/>
    </and>
    <then>
    <fileset id="xbean.src.paths.@{i}"
    dir="${xbean.src.@{i}.dir}"
    includes="${xbean.src.@{i}.include}"
    excludes="${xbean.src.@{i}.exclude}"/>
    </then>
    <else>
    <fileset id="xbean.src.paths.@{i}"
    file="null_file_set"/>
    </else>
    </if>
    </sequential>
    </for>
    <if>
    <isset property="xbean.include-classpath-contributions"/>
    <then>
    <path id="xbean.classpath">
    <path refid="java.classpath"/>
    </path>
    </then>
    <else>
    <path id="xbean.classpath">
    <pathelement location="${wl.home}/common/lib/apache_xbean.jar"/>
    </path>
    </else>
    </if>
    <mkdir dir="${xbean.src.output.dir}"/>
    <mkdir dir="${xbean.bin.output.dir}"/>
    <xmlbean
    javasource="${xbean.java-version}"
    download="${xbean.download-network-urls}"
    typesystemname="${xbean.schema-type-name}"
    noupa="${xbean.unique-particle-attribution}"
    nopvr="${xbean.particle-valid-restriction}"
    noannotations="${xbean.skip-annotations}"
    ignoreDuplicatesInNamespaces="${xbean.namespaces-to-ignore-dups}"
    srcgendir="${xbean.src.output.dir}"
    classgendir="${xbean.bin.output.dir}"
    classpathref="xbean.classpath"
    srconly="true">
    <fileset refid="xbean.src.paths.0"/>
    <fileset refid="xbean.src.paths.1"/>
    <fileset refid="xbean.src.paths.2"/>
    <fileset refid="xbean.src.paths.3"/>
    <fileset refid="xbean.src.paths.4"/>
    <fileset refid="xbean.src.paths.5"/>
    <fileset refid="xbean.src.paths.6"/>
    <fileset refid="xbean.src.paths.7"/>
    <fileset refid="xbean.src.paths.8"/>
    <fileset refid="xbean.src.paths.9"/>
    </xmlbean>
    <if>
    <isreference refid="apt.factory.path"/>
    <then>
    <mkdir dir="${apt.src.output.dir}"/>
    <for-each-java-src-path>
    <if>
    <available file="${.java.src.dir}"/>
    <then>
    <mkdir dir="${.java.src.output}"/>
    <apt
    sourcepath="${java.sourcepath}"
    srcdir="${.java.src.dir}"
    includes="${.java.src.include}"
    excludes="${.java.src.exclude}"
    destdir="${.java.src.output}"
    preprocessdir="${apt.src.output.dir}"
    classpathref="java.classpath"
    factorypathref="apt.factory.path"
    options="${apt.options}"
    compile="false"/>
    </then>
    </if>
    </for-each-java-src-path>
    </then>
    </if>
    <for-each-java-src-path>
    <if>
    <available file="${.java.src.dir}"/>
    <then>
    <mkdir dir="${.java.src.output}"/>
    <javac
    sourcepath="${java.sourcepath}"
    srcdir="${.java.src.dir}"
    includes="${.java.src.include}"
    excludes="${.java.src.exclude}"
    destdir="${.java.src.output}"
    classpathref="java.classpath"
    debug="on"/>
    </then>
    </if>
    </for-each-java-src-path>
    <delete dir="${generated.module.root}"/>
    <mkdir dir="${generated.module.root}"/>
    <resolve-path property="user.web.xml" path="WEB-INF/web.xml"/>
    <resolve-path property="user.weblogic.xml" path="WEB-INF/weblogic.xml"/>
    <copy todir="${generated.module.root}/WEB-INF" file="${user.web.xml}" />
    <copy todir="${generated.module.root}/WEB-INF" file="${user.weblogic.xml}" failonerror="false" />
    </target>
    <target name="clean" depends="init" description=" removes the files and directories generated by the build target">
    <if>
    <available file="${xbean.src.output.dir}"/>
    <then>
    <delete includeEmptyDirs="true">
    <fileset dir="${xbean.src.output.dir}" includes="**/*"/>
    </delete>
    </then>
    </if>
    <if>
    <available file="${xbean.bin.output.dir}"/>
    <then>
    <delete includeEmptyDirs="true">
    <fileset dir="${xbean.bin.output.dir}" includes="**/*"/>
    </delete>
    </then>
    </if>
    <if>
    <available file="${apt.src.output.dir}"/>
    <then>
    <delete includeEmptyDirs="true">
    <fileset dir="${apt.src.output.dir}" includes="**/*"/>
    </delete>
    </then>
    </if>
    <for-each-java-src-path>
    <if>
    <available file="${.java.src.output}"/>
    <then>
    <if>
    <equals arg1="${.java.src.dir}" arg2="${.java.src.output}"/>
    <then>
    <delete includeEmptyDirs="true">
    <fileset dir="${.java.src.output}">
    <or>
    <filename name="**/*.class"/>
    <and>
    <type type="dir"/>
    <depth min="0"/>
    </and>
    </or>
    </fileset>
    </delete>
    </then>
    <else>
    <delete includeEmptyDirs="true">
    <fileset dir="${.java.src.output}" includes="**/*"/>
    </delete>
    </else>
    </if>
    </then>
    </if>
    </for-each-java-src-path>
    <delete dir="${assembly.src}"/>
    <delete dir="${generated.module.root}"/>
    <mkdir dir="${generated.module.root}"/>
    </target>
    <target name="assemble" depends="init" description=" assembles the project for iterative dev deployment; requires that the "ear.root" property is specified">
    <property name="prefix" value=""/>
    <for-each-resource-path>
    <link ear="${ear.root}" source="${.resource.path}" target="${prefix}${uri}/${.resource.prefix}"/>
    </for-each-resource-path>
    <!-- Link in referenced utility projects into the WEB-INF/lib directory. -->
    <for-each-referenced-component>
    <if>
    <and>
    <equals arg1="${.referenced.component.type}" arg2="project"/>
    <equals arg1="${.referenced.component.target.path}" arg2="WEB-INF/lib"/>
    </and>
    <then>
    <antex
    antfile="${.referenced.component.handle}/build.xml"
    dir="${.referenced.component.handle}"
    target="assemble"
    inheritUserProps="false"
    inheritAll="false"
    inheritRefs="false">
    <property name="wl.home" value="${wl.home}"/>
    <property name="patch.home" value="${patch.home}"/>
    <property name="workspace" value="${workspace}"/>
    <property name="init.typedefs.executed" value="true"/>
    <property name="ear.root" value="${ear.root}"/>
    <property name="prefix" value="${uri}/WEB-INF/lib/"/>
    </antex>
    </then>
    </if>
    </for-each-referenced-component>
    <link ear="${ear.root}" source="${xbean.bin.output.dir}" target="${link.target}"/>
    <link ear="${ear.root}" source="${generated.module.root}" target="${uri}"/>
    <antcall target="assembly" inheritAll="true" inheritRefs="true" >
    <param name="ear.root" value="${ear.root}"/>
    </antcall>
    <antcall target="webservice.build" inheritAll="true" inheritRefs="true" />
    </target>
    <target name="stage" depends="init" description=" copies all of project's resources and build artifacts into a form that's ready for archive creation; staging directory can be overridden via the "staging.dir" property">
    <antcall target="assembly" inheritAll="true" inheritRefs="true" >
    <param name="ear.root" value="${ear.staging.dir}"/>
    </antcall>
    <antcall target="webservice.build" inheritAll="true" inheritRefs="true" />
    <property name="staging.dir" value="${project.dir}/.staging"/>
    <delete dir="${staging.dir}" quiet="true"/>
    <mkdir dir="${staging.dir}"/>
    <for-each-resource-path>
    <if>
    <available file="${.resource.path}"/>
    <then>
    <if>
    <isfile path="${.resource.path}"/>
    <then>
    <copy file="${.resource.path}" tofile="${staging.dir}/${.resource.prefix}"/>
    </then>
    <else>
    <copy todir="${staging.dir}/${.resource.prefix}">
    <fileset dir="${.resource.path}" includes="${.resource.include}" excludes="${.resource.exclude}"/>
    </copy>
    </else>
    </if>
    </then>
    </if>
    </for-each-resource-path>
    <!-- Packaged referenced utility projects into the WEB-INF/lib directory. -->
    <property name="webinflib" value="${staging.dir}/WEB-INF/lib"/>
    <mkdir dir="${webinflib}"/>
    <for-each-referenced-component>
    <if>
    <and>
    <equals arg1="${.referenced.component.type}" arg2="project"/>
    <equals arg1="${.referenced.component.target.path}" arg2="WEB-INF/lib"/>
    </and>
    <then>
    <antex
    antfile="${.referenced.component.handle}/build.xml"
    dir="${.referenced.component.handle}"
    target="archive"
    inheritUserProps="false"
    inheritAll="false"
    inheritRefs="false">
    <property name="wl.home" value="${wl.home}"/>
    <property name="patch.home" value="${patch.home}"/>
    <property name="workspace" value="${workspace}"/>
    <property name="init.typedefs.executed" value="true"/>
    <property name="archive.dir" value="${webinflib}"/>
    </antex>
    </then>
    </if>
    </for-each-referenced-component>
    <copy todir="${staging.dir}/${xbean.deploy.prefix}">
    <fileset dir="${xbean.bin.output.dir}"/>
    </copy>
    <if>
    <available file="${generated.module.root}"/>
    <then>
    <copy todir="${staging.dir}" overwrite="true">
    <fileset dir="${generated.module.root}"/>
    </copy>
    </then>
    </if>
    <taskdef name="build-manifests"
    classname="weblogic.ant.taskdefs.build.AnnotationManifestTask"
    onerror="fail" />
    <path id="annotation.manifest.search.path">
    <fileset dir="${staging.dir}">
    <include name="WEB-INF/lib/*.jar"/>
    </fileset>
    <pathelement location="${staging.dir}/WEB-INF/classes"/>
    </path>
    <path id="annotation.manifest.class.path">
    <path refid="annotation.manifest.search.path"/>
    <path refid="java.classpath"/>
    </path>
    <build-manifests moduleDir="${staging.dir}"
    searchClasspathRef="annotation.manifest.search.path"
    classpathRef="annotation.manifest.class.path"
    verbose="true"
    version=""
    stagingDir="${java.io.tmpdir}/.manifest"/>
    </target>
    <target name="archive" depends="stage" description=" creates an archive containing all projects's resources and build artifacts; archive name and location can be overridden via the "archive.path" property">
    <property name="archive.dir" value="${project.dir}"/>
    <mkdir dir="${archive.dir}"/>
    <zip destfile="${archive.dir}/${archive.name}" encoding="UTF8" whenempty="create">
    <fileset dir="${staging.dir}"/>
    </zip>
    </target>
    <target name="stage.to.ear" depends="init">
    <property name="prefix" value=""/>
    <antcallex target="archive" inheritUserProps="false" inheritAll="false" inheritRefs="false">
    <param name="wl.home" value="${wl.home}"/>
    <param name="patch.home" value="${patch.home}"/>
    <param name="workspace" value="${workspace}"/>
    <param name="init.typedefs.executed" value="true"/>
    <param name="archive.dir" value="${ear.staging.dir}${prefix}"/>
    <param name="ear.staging.dir" value="${ear.staging.dir}"/>
    </antcallex>
    </target>
    <target name="generated.root.init" depends="init">
    <property name="generated.module.root" value="${project.dir}/build/weboutput"/>
    </target>
    <target name="assembly" depends="init,generated.root.init">
    <taskdef name="assemble"
    classname="com.bea.control.assembly.AssembleTask"
    classpathref="java.classpath"
    onerror="report" />
    <property name="assembly.src.output" value="${java.src.0.output}"/>
    <mkdir dir="${assembly.src}"/>
    <path id="assembly.classpath">
    <path refid="java.classpath" />
    <pathelement location="${assembly.src.output}" />
    <pathelement path="${java.outpath}" />
    <pathelement path="${java.sourcepath}"/>
    </path>
    <assemble
    moduleDir="${generated.module.root}"
    moduleName="${project.name}"
    srcOutputDir="${assembly.src}"
    appRootDir="${ear.root}">
    <assemblyContext factory="org.apache.beehive.controls.runtime.assembly.WebAppAssemblyContext$Factory" />
    <assemblyContext factory="org.apache.beehive.controls.runtime.assembly.AppAssemblyContext$Factory" />
    <classpath refid="assembly.classpath" />
    <fileset dir="${project.dir}">
    <include name="**/*.controls.properties" />
    </fileset>
    </assemble>
    <apt
    srcdir="${assembly.src}"
    preprocessdir="${apt.src.output.dir}"
    factorypathref="apt.factory.path"
    options="${apt.options}"
    compile="false">
    <classpath refid="assembly.classpath" />
    </apt>
    <javac
    srcdir="${assembly.src}"
    destdir="${assembly.src.output}"
    debug="on">
    <classpath refid="assembly.classpath" />
    </javac>
    </target>
    <target name="webservice.build" depends="init,generated.root.init">
    <path id="jwsc.srcpath">
    <path path="${java.sourcepath}" />
    <pathelement path="build/assembly/.src" />
    </path>
    <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" />
    <property name="jwsc.module.root" value="${project.dir}/build/weboutput"/>
    <property name="jwsc.contextpath" value="billingservice"/>
    <property name="jwsc.srcpath.prop" refid="jwsc.srcpath"/>
    <path id="jwsc.classpath">
    <path refid="java.classpath" />
    <pathelement path="${java.outpath}" />
    </path>
    <jwsc
    destdir="${project.dir}/build"
    classpathref="jwsc.classpath"
    >
    <module name="weboutput" explode="true" contextPath="${jwsc.contextpath}">
    <jwsFileSet srcdir="${jwsc.srcpath.prop}">
    <include name="**/*.java"/>
    </jwsFileSet>
    <descriptor file="${jwsc.module.root}/WEB-INF/web.xml" />
    <descriptor file="${jwsc.module.root}/WEB-INF/weblogic.xml" />
    </module>
    </jwsc>
    </target>
    </project>
    ==================== end of exported build.xml =========
    Thanks!
    Edited by renqili at 08/09/2007 10:52 AM

    It looks a bug to me. The exported ant script does not take care the jar files setup in the classpath in workshop/eclipes and copy them to the WEB-INFO/lib directory.

  • Incorrectly Declaring Schemas as Invalid???

    I am having some problems with the document validation of DBXML. I have a few schemas that I wrote using XMLSpy 2004 (I know it's a little old). They validate through XMLSpy. I also validated them against the W3C validator and they all passed. However, when I try and run a document that references them through DBXML, I get the following error:
    Error: XML Indexer: Parse error in document at line, 1, char 536. Parser message: Complex type 'RecordType' violates the Unique Particle Attribution rule in its components 'bytes' and '##other', errcode = INDEXER_PARSER_ERROR
    The complexType 'RecordType' is defined below:
         <xs:complexType name="RecordType">
              <xs:sequence minOccurs="1" maxOccurs="1">
                   <xs:element ref="ad:adminData"/>
                   <xs:choice>
                        <xs:element name="bytes" type="xs:base64Binary"/>
                        <xs:any namespace="##other" minOccurs="0" maxOccurs="1" processContents="skip"/>
                   </xs:choice>
              </xs:sequence>
         </xs:complexType>
    If I remove one of the lines from the <xs:choice> element (bytes, or any) it works just fine.
    Thanks in advance,
    Brian J. Clark

    After doing a lot of experimentation, I don't think the problem is on my end. I think DBXML (meaning Xerces-C) has a problem with <xs:any> elements. I have created a very basic xsd file and a very basic xml file that contain nothing but a root element with one child. They validate against XMLSpy just fine.
    Schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ad="info:rfa/rfaRegistry/xmlSchemas/adminData" xmlns:col="info:rfa/rfaRegistry/xmlSchemas/collection" xmlns:dc="info:fra/fraRegistry/xmlSchemas/dcInfo" xmlns="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit">
         <xs:annotation>
              <xs:appinfo>
                   <dc:title>RFA Item-Level Deposit Record</dc:title>
                   <dc:creator>Jeffrey A. Young</dc:creator>
                   <dc:date>2006-08-31</dc:date>
              </xs:appinfo>
         </xs:annotation>
         <xs:element name="data" type="dataType" />
         <xs:complexType name="dataType">
              <xs:sequence>
                   <xs:any processContents="strict"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>
    XML File:
    <?xml version="1.0" encoding="UTF-8"?>
    <da:data xmlns:da="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit"
    xmlns:ad="info:rfa/rfaRegistry/xmlSchemas/adminData"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit
    D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/iwsaDeposit-2.xsd
    info:rfa/rfaRegistry/xmlSchemas/adminData
    D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/adminData.xsd">
         <info>Stuff</info>
    </da:data>
    I get the following error from DBXML:
    com.sleepycat.dbxml.XmlException: Error: XML Indexer: Parse error in document at line, 1, char 458. Parser message: Unknown element 'info', errcode = INDEXER_PARSER_ERROR

  • How to Create XML Schema From JTree ?

    Please help me... Thank you.
    This is Code
    Tree.java ----- Run This File
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class Tree extends JPanel implements ActionListener {
        private int newNodeSuffix = 1;
        private static String ADD_COMMAND = "add";
        private static String REMOVE_COMMAND = "remove";
        private static String CLEAR_COMMAND = "clear";
        private static String OK_COMMAND = "ok";
        private DynamicTree treePanel;
        public Tree() {
            super(new BorderLayout());
            //Create the components.
            treePanel = new DynamicTree();
            //populateTree(treePanel);
            JButton addButton = new JButton("Add");
            addButton.setActionCommand(ADD_COMMAND);
            addButton.addActionListener(this);
            JButton removeButton = new JButton("Remove");
            removeButton.setActionCommand(REMOVE_COMMAND);
            removeButton.addActionListener(this);
            JButton clearButton = new JButton("Clear");
            clearButton.setActionCommand(CLEAR_COMMAND);
            clearButton.addActionListener(this);
            JButton okButton = new JButton("OK");
            okButton.setActionCommand(OK_COMMAND);
            okButton.addActionListener(this);
            //Lay everything out.
            treePanel.setPreferredSize(new Dimension(300, 150));
            add(treePanel, BorderLayout.CENTER);
            JPanel panel = new JPanel(new GridLayout(0,1));
            panel.add(addButton);
            panel.add(removeButton);
            panel.add(clearButton);
            panel.add(okButton);
            add(panel, BorderLayout.LINE_END);
        /*public void populateTree(DynamicTree treePanel) {
            String p1Name = new String("Parent 1");
            //String p2Name = new String("Parent 2");
            String c1Name = new String("Child 1");
            //String c2Name = new String("Child 2");
            DefaultMutableTreeNode p1;
            p1 = treePanel.addObject(null, p1Name);
            //p2 = treePanel.addObject(null, p2Name);
            treePanel.addObject(p1, c1Name);
            //treePanel.addObject(p1, c2Name);
            //treePanel.addObject(p2, c1Name);
            //treePanel.addObject(p2, c2Name);
        public void actionPerformed(ActionEvent e) {
            String command = e.getActionCommand();
            if (ADD_COMMAND.equals(command)) {
                //Add button clicked.
                treePanel.addObject("New Node " + newNodeSuffix++);
            } else if (REMOVE_COMMAND.equals(command)) {
                //Remove button clicked.
                treePanel.removeCurrentNode();
            } else if (CLEAR_COMMAND.equals(command)) {
                //Clear button clicked.
                treePanel.clear();
            } else if (OK_COMMAND.equals(command)) {
                 //Ok button clicked.
                 treePanel.ok();
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("Craete XML Tree");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Tree newContentPane = new Tree();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }DynamicTree.java
    import javax.swing.JOptionPane;
    import java.awt.GridLayout;
    import java.awt.Toolkit;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.MutableTreeNode;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.TreeSelectionModel;
    import javax.swing.event.TreeModelEvent;
    import javax.swing.event.TreeModelListener;
    public class DynamicTree extends JPanel {
        protected DefaultMutableTreeNode rootNode;
        protected DefaultTreeModel treeModel;
        protected JTree tree;
        private Toolkit toolkit = Toolkit.getDefaultToolkit();
        public DynamicTree() {
            super(new GridLayout(1,0));
            rootNode = new DefaultMutableTreeNode("Root Node");
            treeModel = new DefaultTreeModel(rootNode);
            treeModel.addTreeModelListener(new MyTreeModelListener());
            tree = new JTree(treeModel);
            tree.setEditable(true);
            tree.getSelectionModel().setSelectionMode
                    (TreeSelectionModel.SINGLE_TREE_SELECTION);
            tree.setShowsRootHandles(true);
            JScrollPane scrollPane = new JScrollPane(tree);
            add(scrollPane);
        /** Remove all nodes except the root node. */
        public void clear() {
            rootNode.removeAllChildren();
            treeModel.reload();
        public void ok() {
             int n = JOptionPane.showConfirmDialog(null, "Do you want to create XML Schema?", "", JOptionPane.YES_NO_OPTION);
        /** Remove the currently selected node. */
        public void removeCurrentNode() {
            TreePath currentSelection = tree.getSelectionPath();
            if (currentSelection != null) {
                DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)
                             (currentSelection.getLastPathComponent());
                MutableTreeNode parent = (MutableTreeNode)(currentNode.getParent());
                if (parent != null) {
                    treeModel.removeNodeFromParent(currentNode);
                    return;
            // Either there was no selection, or the root was selected.
            toolkit.beep();
        /** Add child to the currently selected node. */
        public DefaultMutableTreeNode addObject(Object child) {
            DefaultMutableTreeNode parentNode = null;
            TreePath parentPath = tree.getSelectionPath();
            if (parentPath == null) {
                parentNode = rootNode;
            } else {
                parentNode = (DefaultMutableTreeNode)
                             (parentPath.getLastPathComponent());
            return addObject(parentNode, child, true);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child) {
            return addObject(parent, child, false);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child,
                                                boolean shouldBeVisible) {
            DefaultMutableTreeNode childNode =
                    new DefaultMutableTreeNode(child);
            if (parent == null) {
                parent = rootNode;
            treeModel.insertNodeInto(childNode, parent,
                                     parent.getChildCount());
            //Make sure the user can see the lovely new node.
            if (shouldBeVisible) {
                tree.scrollPathToVisible(new TreePath(childNode.getPath()));
            return childNode;
        class MyTreeModelListener implements TreeModelListener {
            public void treeNodesChanged(TreeModelEvent e) {
                DefaultMutableTreeNode node;
                node = (DefaultMutableTreeNode)
                         (e.getTreePath().getLastPathComponent());
                 * If the event lists children, then the changed
                 * node is the child of the node we've already
                 * gotten.  Otherwise, the changed node and the
                 * specified node are the same.
                try {
                    int index = e.getChildIndices()[0];
                    node = (DefaultMutableTreeNode)
                           (node.getChildAt(index));
                } catch (NullPointerException exc) {}
                System.out.println("The user has finished editing the node.");
                System.out.println("New value: " + node.getUserObject());
            public void treeNodesInserted(TreeModelEvent e) {
            public void treeNodesRemoved(TreeModelEvent e) {
            public void treeStructureChanged(TreeModelEvent e) {
    }

    XML shema is basically an XML file. So u need to know how to create an XML,
    provided u know how the shema file should be.
    Creating an XML :
    http://forum.java.sun.com/thread.jspa?threadID=5181031&messageID=9705786#9705786

  • WBEM SDK - Mapping CIM Object to XML

    Hi all !
    In Sun WBEM SDK such classes as CIMClass, CIMProperty, CIMInstance have
    methods toXML(.....).
    Where can I find specification, used for CIM-to-XML mapping in Sun WBEM SDK?
    I will appreciate any assistance you might be able to offer me.
    Thank you in advance for your attention.
    Please, mail me on [email protected]
    Sincerely yours,
    Ihor Krivenchuck

    To construct an object from XML, builder pattern looks like a good option. Here is a quick design
    public class XMLCoder{
    public static Object decode(InputSream in, XMLBeanMapper xm) throws some_exception_if_ASM_object_is_in_inconsistent_state {
    public static void encode(OutputStream out, XMLBeanMapper){
    public class BeanProperty{
    private String name;
    priavte String value;
    .. cons,accessors and muatators ...
    public interface XMLBeanMapper{
    public void setProperty(BeanProperty bp);
    public Object getObject() throws some_exception_if_ASM_object_is_in_inconsistent_state ;
    public BeanProperty getNextProperty();//returns null if no more property needs to be converted to xml
    for each class that needs conversion to and from XML, you need a XMLBeanMapper class.
    XMLCoder.encode parses XML, creates a BeanProperty from each element and calls setProperty of XMLBeanMapper. The XMLBeanMapper calls necessary method of your ASM object to set the value. When it is done with parsing the xml document, it calls the getObject on the XMLBeanMapper and returns the object or throws exception if needed.
    XMLCoder.decode keeps calling the getNextProperty unless it returns null. It writes necessary xml element from the data provided by the BeanProperty instance.
    Depending on how complex your xml is you will probably need to change the BeanProperty class to keep the XMLcoder generic. For example to handle child elements, you may chain BeanProperty instances, or if the XML may have arbitrarily more information for a property than a name-value pair, you may need to use a hashtable.
    Benefits:
    You have a generic class to parse XML
    The unique XmlBeanMapper implementation for each ASM type will be pretty simple. You can have a generic XmlBeanMapper implementation when the xml elements contains the name of the method
    Disadvantages:
    You need to write and maintain a XMLBeanMapper implementation for each type of ASM class.

  • Read XML file problem

    Hi all,
    I am trying to read an xml file and display the output. i get a blank display. Can anybody please help me out.
    Thanks in advance
    I cant attach the xml file. Since its not a valid extension. Please find the xml code below.
    <Company>
    <Name>Samsung</Name>
    <Location>
    <City>Busan</City>
    <Country>South Korea</Country>
    </Location>
    </Company>
    Regards,
    KM
    Solved!
    Go to Solution.
    Attachments:
    Read Data from XML File.vi ‏9 KB

    If you can change saved .xml file, you can modify it to be compatible with Labview XML shema and use Unflatten from XML like in your VI. If you cannot, you should use XML Parser library. In attachement you can find 2 exmaples for these situations.
    Attachments:
    Modified XML file.vi ‏12 KB
    XML Parsing 1.vi ‏20 KB

  • Combined unique index

    Hi,
    is there a way to create a combined unique index in Berkeley DB XML? (Unique index which is consists of more than one node)
    Thanks in advance.
    Hoan.

    Hoan,
    No there is not.
    Regards,
    George

  • XSD Syndication Problem..

    Hi All,
    I want to transfer data from mdm through syndicator.
    I created the follwing xsd file in xi.(message mapping)
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http:
    mycompany.com\mdm" targetNamespace="http:
    mycompany.com\mdm">
                <xsd:element name="MT_Customer" type="DT_Customer" />
                <xsd:complexType name="DT_Customer">
                            <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        495dde70551e11db9e560011433286d8
                                        </xsd:appinfo>
                            </xsd:annotation>
                            <xsd:sequence>
                                        <xsd:element name="Customer_Data">
                                                    <xsd:annotation>
                                                                <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                13886a30550b11dbcb99cf9a0abc902e
                                                                </xsd:appinfo>
                                                    </xsd:annotation>
                                                    <xsd:complexType>
                                                                <xsd:sequence>
                                                                            <xsd:element name="Customer" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a31550b11dba3f2cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Title" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a32550b11dbcc76cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Name1" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a33550b11db9c96cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Name2" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a34550b11dbbbc7cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Name3" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a35550b11db8470cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Name4" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a36550b11dbb3bfcf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Searchterm1" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a37550b11dbae35cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Searchterm2" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a38550b11dbb7c9cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="City_Post_Code" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a39550b11dba621cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="City" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a3a550b11db9287cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Country" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a3b550b11dbb137cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Region" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a3c550b11dbcc68cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Noof_Employees" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a3d550b11db8a29cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Annual_Sales" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a3e550b11dbbe2bcf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Currency_Of_Sales" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a3f550b11dbb901cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Pobox" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a40550b11db97aecf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Language" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a41550b11dba4becf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Salesdata" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    13886a42550b11dbae61cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                            <xsd:element name="Bank_Details" type="xsd:string">
                                                                                    <xsd:annotation>
                                                                                    <xsd:appinfo source="http://sap.com/xi/TextID">
                                                                                    1f101890551e11dbc760cf9a0abc902e
                                                                                    </xsd:appinfo>
                                                                                    </xsd:annotation>
                                                                            </xsd:element>
                                                                </xsd:sequence>
                                                    </xsd:complexType>
                                        </xsd:element>
                            </xsd:sequence>
                </xsd:complexType>
    </xsd:schema>
    And add xml shema entry in mdm console for the above schema.
    When I try to set destination properties in syndicator...
    I selected XMLSchema as type,client system,schema name. but,I am not able to select any <b>root</b> for it and I am not able to go proceed in syndication.
    Is there any problem in the above xsd file ?
    Please help me.

    Hello Rama:
    It happends because on your XSD you didn't define a data root tag:
    <b><xsd:element name="dataroot">
    </b>
    I here paste an example of this. Please note how Office Access wrapped it all on the dataroot tag:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:od="urn:schemas-microsoft-com:officedata">
    <xsd:element name="dataroot">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="SP1PERS" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="generated" type="xsd:dateTime"/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="SP1PERS">
    <xsd:annotation>
    <xsd:appinfo>
    <od:index index-name="PrimaryKey" index-key="SPBPERS_PIDM " primary="yes" unique="yes" clustered="no"/>
    <od:index index-name="STVNATN_CODE" index-key="STVNATN_CODE " primary="no" unique="no" clustered="no"/>
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="SPBPERS_PIDM" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="SP1PERS_HEIGHT_x0020_" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="SP1PERS_FECHA_MATRIMONIO" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ST4TTRA_TITULO_TRATO" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="STVNATN_CODE" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="GTVZIPC_CODE_LUGAR_NACIMIENTO" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="GTVZIPC_CODE_LUGAR_PROCEDENCIA" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="SP1PERS_CURP" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="SP1PERS_ACTIVITY_DATE" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="SP1PERS_USER_x0020_" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Field11" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    I hope that helps
    Regards
    Alejandro

  • Converting dtd to xsd using java

    Hi,
    please help me i want to convert a dtd file to xml shema file how can i do it using java binding with xml or any api for thise. please send examples if any
    Thanks in advance
    Lokanath
    Message was edited by:
    Akilesh

    I've never used it, but there's this:
    http://jakarta.apache.org/poi/

Maybe you are looking for

  • ITunes sync problems with iphone 5

    Is anyone having problems with iTunes (11.1.2) not syncing properly with their iPhone 5? Some examples: Example 1 Existing playlist on Mac Mini (Mac OS X v10.7.5) edited to add a song iPhone 5 (iOS v 7.0.3) "Sync Music" setup to sync 'Selected playli

  • HTC Rezound Bluetooth issues

    I have communicated with HTC and Verizon over an issue I am having with all sounds coming through Rezound speaker and my Jawbone Era at the sametime while paired and connected. While discussing this issue with HTC the final resolve was them telling m

  • Zoom-in on webpages not remaining after re-start

    I have the latest Firefox for Windows on my computer. The default font sizes when opening the browser were too large, so I zoomed in twice (using 'view', then 'zoom-in'). It worked for the session. But once I close and re-open the browser, that chang

  • HT1420 If I deauthorize all computers, can I reauthorize some of them again?

    I have 5 authorized computers--itunes won't let me see what computers are authorized--I know at least one of them I no longer have--the only option is to deauthorize all--wondering if I can re-authorize ones that I deauthorize.

  • Adobe Photoshop Album Starter Ed 3.0

    I keep getting a debug message. This the information I receive. Any suggestions? App Name: Componentlauncher.exe App Ver 3.0.0o.49815 Mod Name Ntdll.dll ModVer: 5.1.2600.5755 Offset: 000118b5