Using xml schema problem (SAP MDM 7.1 Syndicator)
Good day !
I try to syndicate directory which correspond to some xml-schema and I have a problem.
I want to syndicate data from hierarchy table which have one field which have a type like lookup <Flat> (multivalued).
In XML-schema element "DEF_PRODUCT" and "DEF_PRODUCT_CODE" - attribute presents hierarchy table.
"CREDIT_PRODUCT" and childs presents linked flat table.
According idea and business rules I must get the result like this: each "DEF_PRODUCT" have N-"CREDIT_PRODUCT". One - to- many.
But when I set up all map completely and look to xml result file I start to be disappointed.
XML result file approximately must be like this:
<DEF_PRODUCT>
<CREDIT_PRODUCT/>
<CREDIT_PRODUCT/>
<CREDIT_PRODUCT/>
</DEF_PRODUCT>
but in result I have all <CREDIT_PRODUCT> in one node and child attributes.
I attach 3 pics which explain my situation.
xml-schema :[http://xmages.net/storage/10/1/0/6/3/upload/42ca6ca8.jpg]
field mapping: [http://xmages.net/storage/10/1/0/6/a/upload/bbbc09f2.jpg]
example: [http://xmages.net/storage/10/1/0/c/c/upload/817b0e23.jpg]
Anybody can help me?
About software : SAP MDM 7.1 (7.1.04.139)
P.S: My problem can be resolved succesfully if I will use 1 <main> table and 1 <qualified flat> table.
But in my case I must use hierarchy - structure because it most usable for business - users
>
Christian Heuer wrote:
> Hi,
>
> now I understood and you really have got a point here. But the question is whether you need key mapping then on the remote key level with a tuple anymore. If yes, you won
>
> Best regards
> Christian
If SAP MDM will present many opportunities to me I will be very glad.
I repeat I must get output xml which have the pair like "RemoteKey"="RemoteSystem" in tuple subnode.
In tuple, after your advices.
Ideally, Syndicator must present to each user ability to choose pair "RemoteKey" = "RemoteSystem" in each subnode like <LookUp> table in root (look at my example pic).
Imagine you have one root table and N-linked <lookup> tables.
Tree like this :
<main tbl>
<subtbl1/>
<subtbl2/>
<subtbl3>
<childtbl1/>
<childtbl2/>
</subtbl3>
</main tbl>
It's dangerous to deprive SAP MDM user to select pair "RemoteKey" = "RemoteSystem" from ROOT to ALL and LAST LEAF in abstract hierarchy. How do you think ?
Now, I haven't abilities to solve my problem using standard resources. Really ?
Similar Messages
-
Can't i use xml schema and oledb data connection at the same time?
Hello to all and thanks in advance.I use xml schema and oledb data connection at the same time and the problem is that when I try to export the xml, the outcome is not what i expect.Without the oledb connection everything is ok (just the schema) and the xml complies with the schema.
Can't i have both schema and oledb and the exported xml be as i want it?You can use both at the same time, but not gor Internet access if that's what you're asking.
Now there is a thing called Link Aggregation, which combines a number of interfaces for speed/redundancy, but it really only works locally, and then only with ALL special equipment in the route, and most likely OSX Server involved.
Sorry. -
Any one used quick sizer for SAP MDM?
Any one used quick sizer for SAP MDM?
Hi Subin,
Quicksizer is SAP's online sizing tool.
The sizing process uses the web-based Quick Sizer tool, which calculates SAPS requirements based on throughput numbers, and the number of users working with the different SAP Business Suite components in a hardware and database independent format. You can find further information about the SAP sizing process at the following location
http://service.sap.com/sizing
After obtaining the results of a Quick Sizer project, work with the SAP Competency Center of your specific hardware vendor for sizing and architecture services as you would for physical environments.
For further details please go through this:
http://www.sdn.sap.com/irj/sdn/performance-analysis
Thanks,
Ravi -
XML generation with SAP data using XML schema - Reg
Hello experts,
My requirement is , SAP( ztable data ) data has to be transferred to third party software folder.Third party using XML so they requires output from SAP in XML format.
For that third party software guys told me that they will give their own XML schema to me.I have to generate XML file with SAP data using their XML schema.
Generating XML file with their Schema should be underlined.
I studied that call transformation statement helps for this.
Even then i don't have clear idea about this topic.
Please brief me about how to use their XML schema to generate XML with my own sap data.
Thanks in advance experts.
Kumarplease try this same program and see it ....
*& Report z_xit_xml_check
REPORT z_xit_xml_check.
TYPE-POOLS: ixml.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.
DATA: l_elem TYPE REF TO if_ixml_element,
l_root_node TYPE REF TO if_ixml_node,
l_next_node TYPE REF TO if_ixml_node,
l_name TYPE string,
l_iterator TYPE REF TO if_ixml_node_iterator.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:temporders_dtd.xml'.
* Validation of XML file: Only DTD included in xml document is supported
PARAMETERS: pa_val TYPE char1 AS CHECKBOX.
START-OF-SELECTION.
* Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
* Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
* wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
size = l_xml_table_size ).
* Creating a document
l_document = l_ixml->create_document( ).
* Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
* Validate a document
IF pa_val EQ 'X'.
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
ENDIF.
* Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
* Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
PERFORM process_dom USING l_document.
ENDIF.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
* Local variable declaration
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab TYPE TABLE OF string.
l_filename = pa_file.
* upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Writing the XML document to the screen
CLEAR l_str1.
LOOP AT l_xml_table INTO l_xml_line.
c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data replacement = space ).
c_conv->read( IMPORTING data = l_content len = l_len ).
CONCATENATE l_str1 l_content INTO l_str1.
ENDLOOP.
l_str1 = l_str1+0(l_xml_table_size).
SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
WRITE: /.
WRITE: /' XML File'.
WRITE: /.
LOOP AT l_itab INTO l_str1.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN
l_str1 WITH space.
WRITE: / l_str1.
ENDLOOP.
WRITE: /.
ENDFORM. "get_xml_table
*& Form process_dom
FORM process_dom USING document TYPE REF TO if_ixml_document.
DATA: node TYPE REF TO if_ixml_node,
iterator TYPE REF TO if_ixml_node_iterator,
nodemap TYPE REF TO if_ixml_named_node_map,
attr TYPE REF TO if_ixml_node,
name TYPE string,
prefix TYPE string,
value TYPE string,
indent TYPE i,
count TYPE i,
index TYPE i.
node ?= document.
CHECK NOT node IS INITIAL.
ULINE.
WRITE: /.
WRITE: /' DOM-TREE'.
WRITE: /.
IF node IS INITIAL. EXIT. ENDIF.
* create a node iterator
iterator = node->create_iterator( ).
* get current node
node = iterator->get_next( ).
* loop over all nodes
WHILE NOT node IS INITIAL.
indent = node->get_height( ) * 2.
indent = indent + 20.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
* element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WRITE: / 'ELEMENT :'.
WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
IF NOT nodemap IS INITIAL.
* attributes
count = nodemap->get_length( ).
DO count TIMES.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
WRITE: / 'ATTRIBUTE:'.
WRITE: AT indent name COLOR COL_HEADING INVERSE, '=',
value COLOR COL_TOTAL INVERSE.
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
* text node
value = node->get_value( ).
WRITE: / 'VALUE :'.
WRITE: AT indent value COLOR COL_GROUP INVERSE.
ENDCASE.
* advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom
reward points if it is use fulll ....
Girish -
Autotype from XML schema problems
Hello,
I am trying to autotype the following Xml schema:
http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3
My build.xml contains:
<target name="autotype" >
<autotype
schemaFile="REL-5-MM7-1-3.xsd"
targetNamespace="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3"
packageName="com.foo"
keepGenerated = "True"
destDir="output" />
</target>
1.
I run using ant but it fails..
SubmitRspTypeCodec.java:15: cannot resolve symbol
[autotype] symbol : class GenericResponseTypeCodec
[autotype] location: package soap
[autotype] extends javax.xml.soap.GenericResponseTypeCodec
weblogic.webservice.tools.build.WSBuildException: Failed to do type mapping -
with nested exception:
[weblogic.xml.schema.binding.BindingException: ERROR: during code compilation
- with nested exception:
[java.io.IOException: Compiler failed executable.exec]]
The interesting point is when i deleted following 3 lines from schema (line 413
to 415 in REL-5-MM7-1-3.xsd),
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
no compile error is thrown.
2.
But the weird thing is that some of classes are not generated, for example SubmitReqType,
ReplaceReqType. This is because they reference RelativeOrAbsoluteDateType (line
367). And RelativeOrAbsoluteDateType contains the following union definition:
<xs:union memberTypes="xs:dateTime xs:duration"/>
i think that this union definition might cause problem but neither an error nor
a warning message is submitted from ant. It says successful but missing classes.
I am struggling with these 2 problems for days, any help would be appreciated.
Thanks,
aLiHi Ali,
I suspect that the reason you are having this problem is covered in the following
link:
http://e-docs.bea.com/wls/docs81/webserv/overview.html#1074641
I guess my question is, what else do you have in the build.xml that uses (or attempts
to use) the autotype Ant task? Are you trying to build a client (i.e. a JAX-RPC
static stub) for a web service? Is this for a WebLogic Web Service you want to
build? Or are you just trying to see if autotype can process the .xsd file, in
question? If so, the above link states why it currently won't work.
One alternative option, is to use a Workshop Schema project (or XMLBeans) to process
the .xsd file. I just did that, and it worked fine :-)
Regards,
Mike Wooten
"Ali Pakkan" <[email protected]> wrote:
>
Hello,
I am trying to autotype the following Xml schema:
http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3
My build.xml contains:
<target name="autotype" >
<autotype
schemaFile="REL-5-MM7-1-3.xsd"
targetNamespace="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3"
packageName="com.foo"
keepGenerated = "True"
destDir="output" />
</target>
1.
I run using ant but it fails..
SubmitRspTypeCodec.java:15: cannot resolve symbol
[autotype] symbol : class GenericResponseTypeCodec
[autotype] location: package soap
[autotype] extends javax.xml.soap.GenericResponseTypeCodec
weblogic.webservice.tools.build.WSBuildException: Failed to do type mapping
with nested exception:
[weblogic.xml.schema.binding.BindingException: ERROR: during code compilation
- with nested exception:
[java.io.IOException: Compiler failed executable.exec]]
The interesting point is when i deleted following 3 lines from schema
(line 413
to 415 in REL-5-MM7-1-3.xsd),
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
no compile error is thrown.
2.
But the weird thing is that some of classes are not generated, for example
SubmitReqType,
ReplaceReqType. This is because they reference RelativeOrAbsoluteDateType
(line
367). And RelativeOrAbsoluteDateType contains the following union definition:
<xs:union memberTypes="xs:dateTime xs:duration"/>
i think that this union definition might cause problem but neither an
error nor
a warning message is submitted from ant. It says successful but missing
classes.
I am struggling with these 2 problems for days, any help would be appreciated.
Thanks,
aLi -
PL/SQL web service - how to use XML schema to define inputs/outputs?
Hello,
let us say I want to publish a PL/SQL web service. The package spec that I want to expose is:
CREATE OR REPLACE PACKAGE myWebService AS
FUNCTION loadResults(
username IN VARCHAR2,
password IN VARCHAR2,
resultData IN XMLType)
RETURN XMLType;
END;When I use JDeveloper's wizard to publish my PL/SQL web service, the resulting WSDL contains this:
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://uk/co/weatherbys/aapws/AAPWS.wsdl/types/"
targetNamespace="http://uk/co/weatherbys/aapws/AAPWS.wsdl/types/"
elementFormDefault="qualified">
<element name="loadresultsElement">
<complexType>
<sequence>
<element name="username" type="string" nillable="true"/>
<element name="password" type="string" nillable="true"/>
<element name="resultdata" nillable="true">
<complexType>
<sequence>
<any/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
<element name="loadresultsResponseElement">
<complexType>
<sequence>
<element name="result" nillable="true">
<complexType>
<sequence>
<any/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>It is specifying that anything at all can be passed in and out from the two XMLType arguments, which is fair enough: it has no way of knowing what I am expecting and what I shall return.
My question is, how do I tell JDeveloper that actually I want either or both of those XMLTypes to conform to a particular XML schema?You cannot format the date as a string, unless you do the conversion on the PL-SQL side, before you use it in your WebService mapping. It should be handled as a string.
The only way to convert the XML from SOAP, using this encoding, into literal XML is to apply XSLT to the payload. Not sure why you would like to do this, as the payload should be consumed by another SOAP-awared stack.
Hope this helps,
Eric -
How to handle data quality by using rules defined outside SAP MDM
Hi All,
I have a requirement: There are number of cleansing rules defined in different quality product. I need to integrate that quality tool with SAP MDM. Is it possible to do this? I guess with the help of Java API's!!!!
Can I use MDM enrichment controller here? If yes, than how to use it.
thx,
R.nHi R.n
The MDM Enrichment Framework is certainly the best way to answer your requirements.
Please see the Enrichment Architecture guide at MDM Documentation Center http://service.sap.com/installMDM
A recorded demo session at SDS Community Page is available to present such system.
Regards
Orit -
Using XML Schema in SFP.
Hi..
We have requirement to send the form output in xml file.
The xml file has been picked up PI system and post it in SAP.
But the PI conversion routine looking for specific field names which are usually more than 30 Char. length.
So its not possible to go for DDIC interface in SFP. rather we are thinking of going for a xml schema based interface.
Calling an XSLT routine to swap the field names required by the PI system.
one more thing is we also have some default values populated in the form fields which is also should be populated in the new xml fields.
Is XSLT routine is a solution for this issue ?! or any other ideas ?
Thanks
SamHi Otto,
The form data output directly send to the PI system via Email.
But we change the interface field names closer to PI requirement.
Thanks for your response.
I am closing this thread.
Cheers
Sam -
Using XML schema in a Java application
Hi,
I need to parse and use an XML schema in an application, mainly for helping a user to build an XPATH.
For that, I want to use the Schema classes bundled with Oracle's parser. Is there any documentation about that ? Or are the source code available ?
Thank's
Phil.See the JavaHelp article on my site.
I had developers saying they had to have JavaHelp for their
Java application. After discussion we established that for where
this was going to be used, webhelp was just as acceptable. Being
easier for us that won the day. -
Generating a XML using XML Schema
Hi,
I have a requirement where I need to generate a XML which should follow XML Schema. If XML schema changes, i should still be able to generate XML file. Any sample code or idea will help me.http://java.sun.com/webservices/jaxb/users-guide/jaxb-using.html
This tutorial is a good place to start. ideally you will use the xjc.bat file present in
jwsdp-2.0 (thats whaty i use) to generate a package full of classes that corresponds to your
schema.
Use ANT-build script to generate this package then you will do some marshalling
followed by validating against a DTD, and unmarshalling - to do get java objects out of XML -
Xform validation by using Xml-schema
Hello,
I want to validate XForm by using XForm Schema. In an xform example attached below , there are two input fields zip and zip2.
I am not getting why zip in xform attached below cannot be validated.But zip2 is working fine. I am using mozilla firefox browser.
XForm and XMLSchema is attached below.
XForm is
<?xml version="1.0" encoding="UTF-8"?>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ftype="http://www.example.com/my-file-types">
<head>
<title>Validate Postal Codes</title>
<style type="text/css">
@namespace xf url("http://www.w3.org/2002/xforms");
xf|input {
display: table-row;
line-height: 2em;
xf|label {
display: table-cell;
text-align: right;
font-family: Arial, Helvetica, sans-serif;;
font-weight: bold;
padding-right: 5px;
width: 150px;
*:required {
background-color: yellow;
*:invalid {
background-color: pink;
</style>
<xf:model schema="schema.xsd">
<xf:instance>
<data xmlns="http://www.example.com/my-file-types">
<zip/>
<zip2/>
</data>
</xf:instance>
<xf:bind id="zip" required="true()" type="ftype:zipType" nodeset="ftype:zip" />
<xf:bind id="zip2" required="true()" type="ftype:zip2Type" nodeset="ftype:zip2" />
</xf:model>
</head>
<body>
<xf:input bind="zip" incremental="true">
<xf:label>Zip Code: </xf:label>
<xf:hint>Validation is not correctly specified for this field</xf:hint>
<xf:alert>The 'Zip Code' failed to validate!</xf:alert>
</xf:input>
<xf:input bind="zip2" incremental="true">
<xf:label>Zip Code 2: </xf:label>
<xf:hint>Validation is correctly specified for this field</xf:hint>
<xf:alert>
<xf:output value="concat('The "', name(), '" failed to validate!')" />
</xf:alert>
</xf:input>
</body>
</html>--------------------------------------------------------------------------------
And XML Schema is
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ftype="http://www.example.com/my-file-types" targetNamespace="http://www.example.com/my-file-types" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="data">
<xs:complexType>
<xs:sequence>
<xs:element name="zipType">
<xs:simpleType id="zipType">
<xs:restriction base="xs:string">
<xs:enumeration value="b"/>
<xs:enumeration value="computer"/>
<!-- bad pattern: matches any sequence of 5 digits, even if there are more digits or non-numeric. -->
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="zip2Type">
<xs:restriction base="xs:string">
<xs:pattern value="^\d{2}$"/>
<!-- good pattern: matches only 2 digits, nothing extra -->
</xs:restriction>
</xs:simpleType>
</xs:schema>Looking for some reply.
Best Regards
TabbasumHi Otto,
The form data output directly send to the PI system via Email.
But we change the interface field names closer to PI requirement.
Thanks for your response.
I am closing this thread.
Cheers
Sam -
IMove to FCE using XML - audio problem
Hi everybody,
I am exporting a movie from iMovie 08 to FCE using xml. The conversion seems successful, but resulting FCE sequence uses 2 mono tracks, each panned completely on the left channel (I hear both tracks only on left speaker). I tried also using audio from iMovie thumbs cache but the problem is the same...
The movie is 100 minutes long with many clips, some title and transitions.
I tried converting a shorter movie made from the same original clips, and its audio was ok in FCE...
What can I do?
Thanks in advance,
PaoloAfter further trial and error I discovered that if I remove all transitions from the iMovie, the audio is correctly imported as stereo and the video and audio tracks are linked together for each clip. Also in this case the stereo track is panned to -1 but this is correct, since it means that FC outputs each stereo channel to its own speaker.
Using transitions in iMovie creates in FCE three unlinked tracks for video, audio1 and audio2. Each audio track is separately panned to -1 and this is the wrong passage... to hear the sound correctly I should pan all the audio2 clips to 1...
I suspect some transition to be imported erroneously...
Ciao,
Paolo -
Help me some xml scheme problem
hi, everybody
I'm have some question about xml document, that can have xml scheme more than one on a document ?. please.I want put 2 xml schemes,a.xsd and b.xsd, in a xml document.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<selfTest xmlns="mySelfTestNameSpace"
xmlns:myNameSpace="myTestComplexType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="mySelfTestNameSpace D:\My-Work\MasterDegree\Thesis-Lab\selfTest.xsd myTestComplexType
D:\My-Work\MasterDegree\Thesis-Lab\testComplexType.xsd">
<ElementA></ElementA>
<ElementB>valueEleB1</ElementB>
<myNameSpace:hMessageInfo childOfMsgAttri="xxx" domain="top" port="001">
<myNameSpace:Message></myNameSpace:Message>
</myNameSpace:hMessageInfo>
</selfTest>
// In example If removed Element:<myNameSpace:hMessageInfo> .... , It can validated, but If take with above the error message follow.
- Error Message
This file is not valid:
Unexpected child element 'myNameSpace:hMessageInfo'
File: selfTest.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by SE (TU) -->
<xs:schema targetNamespace="mySelfTestNameSpace" xmlns:mySelftTest="mySelfTestNameSpace" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="selfTest" type="mySelftTest:TranstionType">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="TranstionType">
<xs:sequence>
<xs:element name="ElementA">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="attriElementA" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="ElementB">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="valueEleB1"/>
<xs:enumeration value="valueEleB2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:attribute name="externalTranstion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="aa"/>
<xs:enumeration value="bb"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:schema>
File:testComplexType.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by SE (TU) -->
<xs:schema targetNamespace="myTestComplexType" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:testComplexType="myTestComplexType" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="test">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="hMessageInfo" type="testComplexType:ChildOfMsgInfo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="MessageInfo">
<xs:sequence>
<xs:element name="Message">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string"/>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="domain">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="top"/>
<xs:enumeration value="bottom"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="port" type="xs:string"/>
</xs:complexType>
<xs:complexType name="ChildOfMsgInfo">
<xs:complexContent>
<xs:extension base="testComplexType:MessageInfo">
<xs:attribute name="childOfMsgAttri" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema> -
Defining entities using XML schema
Hi,
We have defined an XML schema for our data by converting a DTD, but I cannot figure out how to allow for entity definitions that
are non-standard. e.g. we have a entity called "°", defined in the DTD as "°". How would I allow for such entries
in the data when parsing it against a schema?
Thanks
PeteHi,
Interesting how the character gets displayed as an actual degree.
The unicode is u00B0.
Any ideas anyone?
Thanks
Pete -
Can't specify XML Schema root in MDM Syndicator
Hello: I am using MDM 5.5 SP3, and I am trying to use Syndicator to output multilingual XML product descriptions. The XSD I am attempting to use is pasted below.
When I attempt to specify the Destination Properties and select the XSD file I have loaded into the repository via the Console, I am unable to select the "Root" (it is grayed out). I am unable to use the XSD in any way within Syndicator because the "OK" button is grayed out...I assume because Root has not been specified.
Any suggestions?
Thank you - Matt
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2000/10/XMLSchema">
<xs:element name="ProdDescription" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ProdCatalogNum" type="xs:string"/>
<xs:element name="Description" type="xs:string" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Language" type="xs:string"/>
<xs:element name="Value" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I also tried this variant with no success. Changes are <b>in bold</b> and notes are <u>underlined</u>.
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2000/10/XMLSchema">
<b><xs:element name="root">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element ref="ProdDescription" />
</xs:choice>
</xs:complexType>
</xs:element></b>
<xs:element name="ProdDescription"> <u>previously: maxOccurs="unbounded"</u>
<xs:complexType>
<xs:sequence>
<xs:element name="ProdCatalogNum" type="xs:string"/>
<xs:element name="Description" type="xs:string" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Language" type="xs:string"/>
<xs:element name="Value" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>I solved my problem: here is the updated XSD:
I believe it was mostly due to the <b>bolded</b> line:
<?xml version="1.0"?>
<b><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"></b>
<xsd:element name="ProdDescription" type="ProdDescType"/>
<xsd:complexType name="ProdDescType">
<xsd:sequence>
<xsd:element name="ProdCatalogNum" type="xsd:string"/>
<xsd:element name="Description" type="DescriptionType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="DescriptionType">
<xsd:sequence>
<xsd:element name="Language" type="xsd:string"/>
<xsd:element name="Value" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Maybe you are looking for
-
Hi all, I'm starting to use Dunning Wizard and I'm having a problem in step 5 (Recomendation Report). In Dunning Term and in Dunning Letter Method i want "One letter per BP". Also I have selected "Apply Letter Template by Highest Level ". In Dunning
-
Deleting Completed Print Jobs in Mac OS X 10.8 ?
How can the job list of completed print jobs be deleted ? The job list fills up with lots of completed and canceled (a 10.7./10.8 bug) jobs and many jobs are added multiple times after a time in the list untill closed and reopened again. This makes i
-
Angle Encoder for Position measurement on SC-6281
Hi, I'm trying to connect a quadrature angle encoder with 3600 ppr to the general purpose counter/timer of a M-Series SC6281 DAQmx board. We use C and have tried using the AngularPosition-Buff.c example code but to no avail. We simply want the counte
-
Windows Media Player Bug - Sort Of
To make a long story short, I could not figure out why my external hard drives were thrashing each time I played a video file from one on my external drives. This would last about five or six minutes each time I played a new file. As my computer is s
-
Change status in internal order
Hi, Does anyone know if there is a function module to change the System-status and user status of the internal order (tcode KO02)? Thanks. Lily