XML Schema for elements names varying with number
HI ,
I have an xml document where the no of tags are unlimited ,but having same name +tag number
ex:-<name1>String</name1>
<name2>String</name2>
<name3>String</name3>
<name4>String</name4>
<name5>String</name5>
I need to design a schema for this xml,where the name tag can go up to any number,i am not able to use attributes,as the system recieving this xml is demanding this format.
can any one give me a schema for this,so that i will be able to generate jaxb objects to generate xml from the schema,in my webservice
Hi Abhishek,
Thanks for your reply
In our project
The remaining part of the code we are dealing with schema and jaxb objects..i am having only this xml which is pending....
as of now i was creating this xml in a dynamic passion only using DOM.
my plan is to atleast do like below
expected result
<doc>
<tag1></tag1>
<tag2></tag2>
<tag3></tag3>
<tag4></tag4>
<tag5></tag5>
</doc>
I am able to generate the below xml
Actual
<doc>
<tag></tag>
<tag></tag>
<tag></tag>
<tag></tag>
<tag></tag>
</doc>
I am trying to write an XSL and transform above result to the expected result. But still not be able to write the xsl to match mmy expected result
Edited by: Aditya on Aug 3, 2011 7:26 AM
Similar Messages
-
I've just downloaded your XML Schema for Java software are have been systematically testing it with a relatively simple document. A few bugs:
1. the use="required" attribute of the attribute element doesn't have any effect (doesn't show any error message or throw any exceptions) when the required attribute is omitted.
2. If I declare an element like:
<element name="age">
<simpleType>
<restriction base="positiveInteger">
<maxInclusive value="100"/>
</restriction>
</simpleType>
</element>
Then, if I modify my xml document instance to say:
<age pointless="true">26</age>
This will throw a non-parser exception with a message of null, instead of saying "Attribute 'pointless' not expected", as it does if I redefine the schema declaration as:
<element name="age">
<complexType>
<simpleContent>
<extension base="my:ageType"/>
</simpleContent>
</complexType>
</element>
Will Allan
nullI'm glad someone else has noticed that unique keyref and key don't seem to be working with the Dom Parser. If they don't work WHY ARE THEY (key, keyref, unique) IN THE EXAMPLE'S THAT ARE DOWNLOADED WITH THE SCHEMA PARSER. In report.xsd, a file downloaded with the example, it makes clear usage of unique, key, and key ref. But if you violate the schema definitions in the corresponding file report.xml the parser doesn't complain whatsoever. The only time it barfs is if you change the keyref refer attribute to something other than "pNumKey". It obviously has to work. No bone head would send example files along with their product that didn't work.
So, if anyone at ORACLE or elsewhere has figured out how to use unique, key, or keyref please respond with an explination of how to correctly use them with the parser. Your name will be blessed throughout the ages as a most kind and venerable person. You will be a hallmark, a standard, a shining light for all future generations of what a human being should be! Okay maybe I'm going a little overboard but I'm DESPERATE. With no books or collateral on how this stupid thing works all I can do is hack.
-Thanks -
How can I define an XML schema for this kind of XML
Hi, There:
I want to generate an XML file like:
<customer>
</customer>
<transaction>
</transaction>
<customer>
</customer>
which have multiple customer elements and multiple transactions as well, and they can happen in mixed sequence. Can any one give me some idea about how can I create an XML schema for this kind of xml? (<xsd:complextype> <xsd:sequence> ) seems not work)
Thanks in advance
DavidUse a group then make it a choice, like this;
<xs:element name="Parent">
<xs:complexType>
<xs:group ref="Group" minOccurs="1" maxOccurs="unbounded" />
</xs:complexType>
</xs:element>
<xs:group name="Group">
<xs:choice>
<xs:element ref="OptionOne" type="xs:string" />
<xs:element ref="OptionTwo" />
</xs:choice>
</xs:group>
<xs:element name="OptionOne">
<xs:complexType>
<xs:attribute name="name" type="xs:string" />
<xs:attribute name="Type" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="OptionTwo">
<xs:complexType>
<xs:attribute name="name" type="xs:string" />
<xs:attribute name="Type" type="xs:string" />
</xs:complexType>
</xs:element>
This allows XML like this
<Parent>
<OptionTwo ........ />
<OptionOne ........ />
<OptionTwo ........ />
<OptionOne ........ />
<OptionOne ........ />
</Parent>
HH -
I want parameter for program name entering with f4 help pls send code
I want parameter for program name entering with f4 help pls send code
Points if helpfulHi,
PROG is a string which indicates the type of the object --- program
u can call the FM as follows
CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
EXPORTING
<b> object_type = 'PROG'
OBJECT_NAME = p_report</b>
ENCLOSING_OBJECT =
SUPPRESS_SELECTION = 'X'
VARIANT = ' '
LIST_VARIANT = ' '
DISPLAY_FIELD =
MULTIPLE_SELECTION =
SELECT_ALL_FIELDS = ' '
WITHOUT_PERSONAL_LIST = ' '
IMPORTING
OBJECT_NAME_SELECTED =
ENCLOSING_OBJECT_SELECTED =
STRUCINF =
TABLES
OBJECTS_SELECTED =
RECORD_TAB =
EXCEPTIONS
CANCEL = 1
WRONG_TYPE = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Patil -
Error in Sun XML schema for servlet2.4 deployment descriptor?
Hi,
I'm including the new XML schema for version 2.4 of the servlet standard in my web.xml deployment descriptor, using http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
When I try to save the XML file, XMLSpy reports an error in the schema file itself: "Undefined schema component 'base' encountered - simpleContext can not have a base that is a complexType with complexContent"
This error is on line 744, and is caused by the snippet:
<xsd:simpleContent>
<xsd:extension base="j2ee:nonEmptyStringType"/>
</xsd:simpleContent>
Can anyone explain why I'm getting a validation failure on this schema? Surely someone else must have experienced the same thing, but I can't track down any reference to it anywhere. Help!XMLSpy is known to be flawed. From my own experience of implementing
validators and data-binding tools, and from my experience of working in the
W3C Schema working group, I can tell you that there are countless cases
where XMLSpy violates the schema specification.
I checked the corresponding part of the schema, but it looks correct to me.
So I suspect that this is another bug in XMLSpy.
Try Xerces. That's probably the best in terms of conformance to the spec. -
Aperture keeps asking for my name and serial number
Aperture keeps asking for my name and serial number, but only on one of my Macs. This is a new Mac that I restored from my old Mac. It made sense to have to put in the documentation the first time, but the program keeps asking for it. Any thoughts?
Be sure to enter the serial number, when you are logged in from an account with Administrator priveleges - otherwise the serial number cannot be stored.
Aperture is installed for all users on your mac, so the serial number is written to the system library, not the user library; this requires read/write access for administrators. Do you enter your serial number using an administrator account?
SInce you migrated your system from another mac, you still may have an older ProAppSystemID file or Aperture cannot write to the System Library.
To stop Aperture asking for the serial number, first check, if you still have an old file "ProAppsSystemID" in your System Library.
Quit Aperture.
Go to your MacintoshHD and open the folder "Library", then "Application Support", then "ProApps".
Remove the File "ProAppsSystemID" to the Desktop, if it exist and restart Aperture.
Reenter your serial number, hopefully for the last time.
Sometimes Aperture writes this file to a temporary directory, when it cannot write to the Library. If the above does not work, look at the temporary directory /tmp
Use the Finder's "Go" menu
Go > Got to folder and enter /tmp into the textfield. If you see ProAppsSystemID there, move it to its proper location in /Library/Application Support/ProApps.
Aperture must be running, and you will have to wait a few minutes to be seeing the file appearing the /tmp directory.
Regards
Léonie -
Generating an XML schema for a TABLE
Hi,
I know I can easily export DATA into an XML file, but Sql Developer can also generate an XML schema for a table LAYOUT. Does anyone know how this is done?
I did it some time ago and have been unable to do it again.
ThanksHi Thanks for the response. Yes, what you say is the type of thing I mean. The snippet below was actually created using SqlDeveloper, but I just can't seem to be able to do it again :-(
<?xml version='1.0' encoding='Cp1252' ?>
<results>
<row>
<Column_Name><![CDATA[AD_UNIT_ID]]></Column_Name>
<Data_Type><![CDATA[NUMBER(5,0)]]></Data_Type>
<Nullable><![CDATA[Yes]]></Nullable>
<Data_Default><![CDATA[]]></Data_Default>
<COLUMN_ID><![CDATA[1]]></COLUMN_ID>
<Primary_Key><![CDATA[]]></Primary_Key>
<COMMENTS><![CDATA[]]></COMMENTS>
</row>
<row>
<Column_Name><![CDATA[AD_UNIT_NAME]]></Column_Name>
<Data_Type><![CDATA[CHAR(30 CHAR)]]></Data_Type>
<Nullable><![CDATA[Yes]]></Nullable>
<Data_Default><![CDATA[]]></Data_Default>
<COLUMN_ID><![CDATA[2]]></COLUMN_ID>
<Primary_Key><![CDATA[]]></Primary_Key>
<COMMENTS><![CDATA[]]></COMMENTS> -
SQL Developer generating an XML Schema for a table
I hope I've put this question in to correct area of the forum!
My question is how do you generate an XML schema of a table layout in SQL Developer?
You can generate an XML schema for the DATA, but I just want to generate one with all the column definitions etc.
The annoying thing is I managed to do this the other day, but after attempting again for several hours I've forgotten how to do it :-(
Thanks and regards, AdrianA more specific answer, using SqlDeveloper itself, can be found at
Re: Generating an XML schema for a TABLE -
How to create schema for Header and Footer with pipe delimiter file BPEL11g
Hi all,
I have issule creating Schema for Header and Footer with body file .The file format is Pipe delimiter.The following format below like is...
Softeware Components:File Adapter(Read) 11g,
1|1211|000|577|5444
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|4544|000|yted
I hope get the sollution for this from this Forum..Please help me out..Thankyou.You mean how many rows or columns..?
If coloumns means 5 and rows only one(1). -
I have a list of schema files and they a number of elements in them. But for my data extraction i use only close to 300 tags. When i register the schema I get an error that a table cannot of have more than 1000 columns. My work mate is working on Annotations and I am planning to build a new schema to make extract only these 300 tag names and also make sure the XML file can be validated like it did earlier. Explaining this i came across a complex type element called *<any>* which can be used to allow elements to be available which are not declared within the schema file.
My Original schema file looks something like below,
<xsd:complexType name="WfInformation">
<xsd:all minOccurs="0">
<xsd:element name="Company" type="WfCompany" minOccurs="0" />
<xsd:element name="HeadOffice" type="WfOffice" minOccurs="0" />
<xsd:element name="IndependentOffice" type="WfIOffice" minOccurs="0" />
<xsd:element name="AffiliateCompany" type ="WfIAOffice" minOccurs="0" />
<xsd:element name="Number" type="xsd:string" minOccurs="0" />
<xsd:element name="ReferenceID" type="xsd:string" minOccurs="0" />
</xsd:all>
</xsd:complexType>
of the above list of items i use only elements Company, HeadOffice, Number. After reading through some documentation I wanted to <any> tag like below,
<xsd:complexType name="WfInformation">
*<xsd:sequence>*
<xsd:element name="Company" type="WfCompany" minOccurs="0" />
<xsd:element name="HeadOffice" type="WfOffice" minOccurs="0" />
*<xsd:any processContents="lax"/>*
*<xsd:any processContents="lax"/>*
<xsd:element name="Number" type="xsd:string" minOccurs="0" />
*<xsd:any processContents="lax"/>*
*</xsd:sequence>*
</xsd:complexType>
My question is if I am correcting the lines as i mentioned above will be Register schema again fail with same reason that i have 1000 columns. As i understand every element inside an Complex element is stored as a column value. In that case will this redesign work. Or is there any other way to approach re-desgin the XML Schema.Thanks. I think that leaves out my option to create a totally new Schema to suit my XML files.
Only other option we have is to use Annotations.
I think my colleague - eoin62 would have shared the XML Schema files earlier through your oracle email address.
Please refer thread - How to register multiple XSD files
But we received a reply and we knew very little on how to make changes to Admin.xsd and how would that solve our problem. Please correct me if i am incorrect. Because the biggest Schema was estimate.xsd that has close to 800+ elements. I am not sure if my colleague sent you the necessary tag names we use within the Schema. We have close to around 300 tags we use. But our combined XML Schema has close to 1600+ If we have to annotate, i thought it would be better we tell Oracle which tagswe need, which inturn should should help better create XMLtype table against a Schema and work on performance.
Your earlier reply was,
Basically in XML Schema Admin.xsd element AdminCompin WorkfileTypeneeds to be stored Out of line..
Add the annotations xdb:SQLInline=”false” and xdb:defaultTable=”ADMIN_COMP_XML”. to the element..
if you can share with our XML Schema on how to annotate or if you can share a location that shows how an annotated or non-annotated Schema works that would help us correcting our Schema files.
Thanks for all your support. We have gone a long way in XML Parsing in the last 6 weeks.
Edited by: beta32c on Feb 19, 2013 12:09 AM -
Data Insertion, XML Schema Specifying Element minOccurs="1
An XML schema having an element with attribute minOccurs="1" has been successfully registered. A table was created based on that schema. Inserting data both with and without that element works successfully. Why is this?
The only thing right now, I can think of, is that the database doesn't recognize it as being controlled via / depends on a registered XML Schema. See the FAQ on this forum for examples (See here: How does XML DB handle XML Schema Validation ?
-
Mapping DTO to XML Schema for Worship Web Service
I have a number of DTOs that my application uses. This application
needs to consume a number of document style web services created in
workshop. When I generate the proxies for this web service, it creates
Java beans for the XML schema types defined in the web service.
Is there a way to get the workshop stubs to map my DTOs to XML schema?
If not, what is the best way to do this mapping? Thanks.
MikeI have a number of DTOs that my application uses. This application
needs to consume a number of document style web services created in
workshop. When I generate the proxies for this web service, it creates
Java beans for the XML schema types defined in the web service.
Is there a way to get the workshop stubs to map my DTOs to XML schema?
If not, what is the best way to do this mapping? Thanks.
Mike -
Mapping DTO to XML Schema for Workshop Web Service
I have a number of DTOs that my application uses. This application
needs to consume a number of document style web services created in
workshop. When I generate the proxies for this web service, it creates
Java beans for the XML schema types defined in the web service.
Is there a way to get the workshop stubs to map my DTOs to XML schema?
If not, what is the best way to do this mapping? Thanks.
MikeI have a number of DTOs that my application uses. This application
needs to consume a number of document style web services created in
workshop. When I generate the proxies for this web service, it creates
Java beans for the XML schema types defined in the web service.
Is there a way to get the workshop stubs to map my DTOs to XML schema?
If not, what is the best way to do this mapping? Thanks.
Mike -
Oracle XML Parser for PL/SQL - troubles with charset
Hi,
I'm using Oracle XML Parser for PL/SQL and have some troubles with charset of results xmldom.writeToBuffer and xmldom.writeToCLOB procedures.
Some tags in my DOM documents contain text values in RUSSIAN (server nls_charset is CL8ISO8859P5). When I write document in varchar2 variable, buffer content is in UTF8 charset ( convert UTF8->CL8ISO8859P5 -OK).
xmldom.setCharset(doc, 'ISO-8859-5') just after xmldom.newDOMDocument has no effect.
xmldom.setCharset(doc, 'CL8ISO8859P5') has no effect also.
Explicit charset direction in third parameter of
xmldom.writeToBuffer and xmldom.writeToCLOB procedure has no effect.
When I write document in CLOB, and then read part of CLOB in varchar2 buffer - result contain '?' in place of all russian text characters.
What's a problem?
How can I force XML Parser write XML in server charset?
Oracle XML Parser for PL/SQL v 1.0.2I have the same problem. But in my case I am allowed only to use XML Parser for PL/SQL.
Characterset 'WE8ISO8859P1' is used. And the language is latvian.
After parsing a XML document and printing its contents, all latvian characters are replaced by "f".
xmldom.setcharset(doc,'WE8ISO8859P1') has no effect. -
Create schemas for Reporting Data Warehouse with Oracle XE
There is the possibility to import dw house and loader with the database Oracle XE?
I receive this error ORA-00439: feature not enabled: Advanced replication in CIM log.
I saw that the database, we do not have the feature 'Advanced replication'.
SQL> select * from v $ option where parameter = 'Advanced replication';
PARAMETER
VALUE
advanced replication
FALSE
Log CIM:
**** info Mon Feb 23 14:16:00 BRT 2015 1424711760686 atg.cim.database.dbsetup.CimDBJobManager Top level module list for Datasource Reporting DataWarehouse: DCS.DW,ARF.DW.base,ARF.DW.InternalUsers,Store.Storefront
**** info Mon Feb 23 14:16:05 BRT 2015 1424711765012 atg.cim.database.dbsetup.CimDBJobManager 0 of 0 imports not previously run.
**** info Mon Feb 23 14:16:05 BRT 2015 1424711765192 atg.cim.database.dbsetup.CimDBJobManager Top level module list for Datasource Reporting Loader: DafEar.Admin,DCS.DW,DCS.PublishingAgent,ARF.base,Store.EStore,Store.EStore.International
**** info Mon Feb 23 14:16:05 BRT 2015 1424711765733 atg.cim.database.dbsetup.CimDBJobManager 1 of 1 imports not previously run.
**** info Mon Feb 23 14:16:05 BRT 2015 1424711765953 atg.cim.database.dbsetup.CimDBJobManager Top level module list for Datasource Publishing: DCS-UI.Versioned,BIZUI,PubPortlet,DafEar.Admin,DCS-UI.SiteAdmin.Versioned,SiteAdmin.Versioned,DCS.Versioned,DCS-UI,Store.EStore.Versioned,Store.Storefront,DAF.Endeca.Index.Versioned,DCS.Endeca.Index.Versioned,ARF.base,DCS.Endeca.Index.SKUIndexing,Store.EStore.International.Versioned,Store.Mobile,Store.Mobile.Versioned,Store.Endeca.International,Store.KnowledgeBase.International,Portal.paf,Store.Storefront
**** info Mon Feb 23 14:16:11 BRT 2015 1424711771561 atg.cim.database.dbsetup.CimDBJobManager 65 of 65 imports not previously run.
**** info Mon Feb 23 14:16:11 BRT 2015 1424711771722 atg.cim.database.dbsetup.CimDBJobManager Top level module list for Datasource Production Core: Store.EStore.International,DafEar.Admin,DPS,DSS,DCS.PublishingAgent,DCS.AbandonedOrderServices,DAF.Endeca.Index,DCS.Endeca.Index,Store.Endeca.Index,DAF.Endeca.Assembler,ARF.base,PublishingAgent,DCS.Endeca.Index.SKUIndexing,Store.Storefront,Store.EStore.International,Store.Recommendations,Store.Mobile,Store.Endeca.International,Store.Fluoroscope,Store.KnowledgeBase.International,Store.Mobile.Recommendations,Store.Mobile.International,Store.EStore,Store.Recommendations.International
**** info Mon Feb 23 14:16:12 BRT 2015 1424711772473 atg.cim.database.dbsetup.CimDBJobManager 30 of 30 imports not previously run.
**** info Mon Feb 23 14:16:19 BRT 2015 1424711779573 atg.cim.database.dbsetup.CimDBJobManager Creating Schema for Datasource Reporting DataWarehouse
**** info Mon Feb 23 14:16:19 BRT 2015 1424711779653 atg.cim.database.dbsetup.CimDBJobManager Top level module list for Datasource Reporting DataWarehouse: DCS.DW,ARF.DW.base,ARF.DW.InternalUsers,Store.Storefront
**** info Mon Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager Create DatabaseTask for Module ARF.DW.base, sql/db_components/oracle/arf_ddl.sql
**** info Mon Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager Create DatabaseTask for Module ARF.DW.base, sql/db_components/oracle/arf_view_ddl.sql
**** info Mon Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager Create DatabaseTask for Module ARF.DW.base, sql/db_components/oracle/arf_init.sql
**** info Mon Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager Create DatabaseTask for Module DCS.DW, sql/db_components/oracle/arf_dcs_ddl.sql
**** info Mon Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager Create DatabaseTask for Module DCS.DW, sql/db_components/oracle/arf_dcs_view_ddl.sql **** info Mon Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager Create DatabaseTask for Module DCS.DW, sql/db_components/oracle/arf_dcs_init.sql
**** info Mon Feb 23 14:16:21 BRT 2015 1424711781085 atg.cim.database.dbsetup.CimDBJobManager Found 2 of 6 previously unrun tasks for Datasource Reporting DataWarehouse
**** info Mon Feb 23 14:16:21 BRT 2015 1424711781085 atg.cim.database.dbsetup.CimDBJobManager 1 ARF.DW.base : sql/db_components/oracle/arf_view_ddl.sql
**** info Mon Feb 23 14:16:21 BRT 2015 1424711781085 atg.cim.database.dbsetup.CimDBJobManager 2 DCS.DW : sql/db_components/oracle/arf_dcs_view_ddl.sql
**** info Mon Feb 23 14:16:21 BRT 2015 1424711781085 /atg/dynamo/dbsetup/job/DatabaseJobManager Starting database setup job 1424711781085.
**** Error Mon Feb 23 14:16:21 BRT 2015 1424711781516 /atg/dynamo/dbsetup/database/DatabaseOperationManager --- java.sql.SQLException: ORA-00439: feature not enabled: Advanced replication
is there a workaround?Hi
We haven't tested and certified with Oracle XE internally
You need to use an Oracle Enterprise Edition for Advanced Replication
What version of Oracle Commerce are you installing, I cannot tell from the log snippet you have posted
++++
Thanks
Gareth
Please mark any update as "Correct Answer" or "Helpful Answer" if that update helps/answers your question, so that others can identify the Correct/helpful update between many updates.
Maybe you are looking for
-
Problem with business place and section code in miro screen
hi experts, i have done the following config. for validate the b/place and section code at the time of invoice and payment. in prerequisite-com.code=l001 and (posting key=31 or posting key=29 or posting key=21 in check-business place=1001 and sectio
-
Is there any way to crop part of a screen shot and paste into Pages?
Instead of importing an entire photo into Pages, I am trying to: -take a screen shot of iPad documentation - open in photo roll and crop a section out of it - paste into Pages Is there an App that might crop and paste into Pages? Thanks for any help.
-
CAN'T CONNECT MACPBOOK PRO OSX10.10.2 WIRELESS OR USB TO HP LJP1102
CAN'T CONNECT MACBOOK PRO OSX10.10.2 TO HP LJP1102 WIRELESS OR USB
-
New songs and playlists won't sync to iPod since 8.0.2
I have an 80gb iPod classic. I have made numerous failed attempts to sync new songs and playlists since downloading this latest 8.0.2 version of iTunes. When I plug in my iPod it shows up in iTunes, when I sync it iTunes shows a progress bar, then it
-
Problem while loading md 0ACOUNT_TEXT
Hello, We encounter a problem when we updtade data for md object 0ACCOUNT_TEXT The error message is: 'Error 4 in update' RSAR 119 In the PSA: datarecord '....' Invalid "to" date '00000000' Can anyone help us out? Lex Meijerink