on 04-14-2009 2:09 PM
Hi all,
Please look into the sample DTD file where note is the root element having occurence (min=1,Max=1).
I want to change the occurence of root element as 1..unbounded.
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
regards
Gabriel
you can change the occurance of IDOC TYPE but not MESSAGE TYPE.
for changing the occurance of IDOC TYPE, first download the XSD to file and change the occurance. and re-import as External Definition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Normally,
You can not have root element with multiple occurence.
Which will make XML not well- formed.
For Any XML to be well-formed root element(Top level) should occur only once.
You can check on any editors like Altova XML Spy.
Hope this helps.
Best Regards,
Divyesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With XSDs it's possible to have multiple root elements. But when searching I did not found any reference showing this for DTDs... frankly I didn't tried before for DTDs.
You may check with the Altova tool - it's the best out there. If it's impossible you either choose XSD or set a new root element on top.
Hi,
Root element serves as MT in IR.
You can not change the occurence of MT.
You can have alternate root elements but you can hev only single root element.
Yes, we do change occurence of element to unbounded, like In case of IDOC, we change occuremce of element ORDERS/IDOC element not for ORDERS element, which acts as root element of XML message.
Thanks,
Divyesh
Hi,
You can change occurence of chaild elements.
I think,About changing occurence of child elements would npt be possible.
A DTD like:
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE rootelement [
<!ELEMENT rootelement (childelement+)>
<!ELEMENT childelement (#PCDATA)>
]>
Will confirm to structure:
<rootelement>
<childelement>Child element.</childelement>
<childelement>Child element.</childelement>
</rootelement>
Best Regards,
Divyesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I need the DTD structure for the following one.
<rootelement>
<childelement>Child element.</childelement>
</rootelement>
<rootelement>
<childelement>Child element.</childelement>
</rootelement>
There you can see the multiple occurence of root element. How do you change the occurrence of root element to unbounded in DTD file.
But its possible in XSD...
You can use this to express whether the element is required or optional:
<!ATTLIST elementname attr1 TYP #REQUIRED
attr2 TYP #IMPLIED
#REQUIRED => must appear
#IMPLIED => optional appearance
Or this to express it may occure min 1:
<!ELEMENT autor (name, vorname+)>
? => element may occur once or never
+ => element may occur min 1
=> element may occure optional / as often as necessary
Edited by: Kai Lerch-Baier on Apr 14, 2009 3:28 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may use this tool ALTOVA XML SPY (a test phase of 30 days is given). It's possible to create XSD / DTS / etc. with this tool and also to convert XSD <=> DTD or even generate a DTD on a XML basis.
http://www.altova.com/simpledownload2c.html?gclid=CKLh3o7H8JkCFYUSzAodsAzuRw
Hope this helps to resolve the problem ;o)
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.