Create an XML of complex XSD
We have to create an XML file of complex XSD. So we have multiple datastores created in the Model. As far as i have searched, we need to create interfaces for each datastore and create the XML file using the procedure. Is there any way to create the XML file without so many interfaces??
An XML document may be generated from an XML Schema
with the following methods.
1. Bind XML Schema to Java classes with JAX-B
compiler n JDeveloper or with JAXB class generator.
Marshall Java classes to XML document.
http://www.oracle.com/webapps/online-help/jdeveloper/1
0.1.3/state?navSetId=_&navId=4&vtTopicFile=working_wit
h_xml/xml_pjaxb.html&vtTopicId=
http://www.oracle.com/technology/pub/notes/technote_ja
xb.html
2. Create an XML document instance from a XML Schema
in JDeveloper.the first mothod is good, but is a not-dinamic method.
I must write a Swing Application that from a "general" XmlSchema generate a empty or no empty XML file, but with this metod a must adjust the java source every time! no???
for example:
ObjectFactory factory=new ObjectFactory();
CatalogImpl catalog=(CatalogImpl)(factory.createCatalog());
marshaller.marshal(catalog, new FileOutputStream(xmlDocument));
in this example for each XMLSchema i must change the name of the type CatalogImpl!!
there`s a genral method to do this?
Similar Messages
-
Create an XML file from XSD file in JDeveloper
Hi,
I am working on XML DTD and XSD to validate xml file using JDeveloper.
1. How we can create xml file from XSD in JDeveloper.
2. How to design content model very easily..
3. where can I learn XSD easily.. any URL
can anyone help out..
with regards
Abu SufianThe XML node in the new gallery has an option to create XML document from schema
See this demo:
http://www.oracle.com/technology/products/jdev/viewlets/1013/xml_viewlet_swf.html
There are several places on the Web that teaches XSD
for example: http://www.w3schools.com/schema/ -
Creating a XML file from XSD file
Is there a piece of Java code that will convert a file to XML using a XSD without the use of generated Java classes?
Thanks alot,
AmyI tried the link in asp.net but When I double click the exe it just pops off and goes.....How to use C# application......I am using Visual web developer 2005......please help in creating XML from XSD file
-
How to create an xml from xsd in abap
HI Experts,
i want to create an xml file from xsd and i want to validate an xml file against an xds.is this possible in abap.if it is possible can any one give me an sample code
for this one.
how to create an xml file in abap.i have seen so many blogs which parses the xml file but i didn't get blog for creating an xml file.how can we do that one.
any suggestions will be appriciated
thanks in advance
With Regards
NaiduHI
GOOD
IT IS POSSIBLE IN ABAP
Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.
XSD->
XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. in more detail.
XDS->
XDS can process data images from CCD-, imaging-plate, and multiwire-detectors in a variety of formats. Detector specific Input file templates greatly simplify the use of XDS; they are provided as part of the documentation.
XDS runs under Unix or Linux on a single server or a grid of up to 99 machines of the same type managed by the MOSIX system; in addition, by using OpenMP, it can be executed in parallel on up to 32 processors at each node that share the same address space.
http://www2.stylusstudio.com/SSDN/default.asp?action=9&fid=23&read=2926
/people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
THANKS
MRUTYUN -
Hello,
can anybody help me with generating an empty tagged XML file from a XSD file. Any sample java code will be highly appreciated.
Thanx in advance.
A .Apache XML Beans presents a way to compile the XSD Schema and generate Java classes for each element defined in the schema. With these interface you can then create new XML instances from the schema. (http://xmlbeans.apache.org/)
-
Hi,
i'm new at this, so i need some help. I am developing web service that interacts with user over SOAP. User has to send xsd and web service has to create or update xml whitch is something like database. Is this posible?
Thanx,
Alan.With XMLBeans an XML document may be generated from a schema.
Refer to section
Creating New XML Instances from Schema
http://xmlbeans.apache.org/docs/2.0.0/guide/conGettingStartedwithXMLBeans.html -
ODI : create an XML model with UBL technology instead of XSD file
Hello,
I have several xsd files which contain UBL (Universal Business Language) and all these files are linked between them. In Oracle Data Integrator, I would like generate a XML model from these files as I use to do with the standard xsd files. Unfortunately, it doesn't work with the driver I use usually.
Do you know if you can generate an xml model from xsd files which contain UBL and if yes, could you say me all the steps I must do to that successfully please?
Thank you in advance.
OlivierHello All,
What I mean is :
when an xsd file calls an other xsd files by using the namespaces (when 2 xsd files are linked), is there a way to create an xml model matching with the contain of these 2 xsd files?
Can someone say me if the only solution to generate a xml model is to have only one xsd file?
Thank you in advance -
Catch all error information while validating xml content with xsd schema
Hi experts,
I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
parser.setFeature( "http://xml.org/sax/features/validation" , true);
parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
// In error handler, I comment all code so as not to throw any exception
public class ParseErrorHandler extends DefaultHandler
public void error(SAXParseException e) throws SAXException
// sSystem.out.println("Error" + e.getMessage());
// throw e;
public void fatalError(SAXParseException e)
// throw e;
// System.out.println("SAP Fatal Error" + e.getMessage());
Unfortunately the program always stopped while catching the first error. Check the below log.
com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
ERRORS :
cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
-> com.sap.engine.lib.xml.parser.ParserException:
I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
Thanks.<h6>Hi experts,
<h6>
<h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
<h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
<h6>parser.setFeature( "http://xml.org/sax/features/validation" , true);
<h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
<h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
<h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
<h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
<h6>
<h6>// In error handler, I comment all code so as not to throw any exception
<h6>public class ParseErrorHandler extends DefaultHandler
<h6>{
<h6> public void error(SAXParseException e) throws SAXException
<h6> {
<h6> // sSystem.out.println("Error" + e.getMessage());
<h6> // throw e;
<h6> }
<h6>
<h6> public void fatalError(SAXParseException e)
<h6> {
<h6> // throw e;
<h6> // System.out.println("SAP Fatal Error" + e.getMessage());
<h6>
<h6> }
<h6>
<h6>}
<h6>
<h6>Unfortunately the program always stopped while catching the first error. Check the below log.
<h6>
<h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
<h6>ERRORS :
<h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
<h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
<h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
<h6> -> com.sap.engine.lib.xml.parser.ParserException:
<h6>
<h6>
<h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
<h6>Thanks. -
Creating an xml file from the Basic java Object
how to create an XML file using the values available in the object with reference to an xsd or dtd file..
(OR )
is it possible to write the contents of an object to an xml file without knowing the dtd or xsd file .......how to create an XML file using the values available in the object with reference to an xsd or dtd file..
(OR )
is it possible to write the contents of an object to an xml file without knowing the dtd or xsd file ....... -
Convert the XML file into XSD format?
Hello All,
I got XML file and i need to convert into XSD format and import it into PI system, so no need to create the structure.
Please let me know how to convert XML format into XSD format.
Regards,
chinnaHi ,
You can use Altova XML Spy software. There just open the xml file and goto Menu bar DTD/Schema there you have an option like Genrate DTD/Schema click on it and press ok, Then it will ask you for location to store xsd select Desktop or some folder.
.xsd will be created. and you can import that.
Thanks. -
Hi all,
I just read Pages 346-348 of the book "Microsoft SQL Server 2012 Bible" written by A. Jorgensen, P. LeBlanc, J. Chinchilla, J. Segarra & A. Nelson (published by Wiley) regarding XML Schemas and XML SCHEMA COLLECTIONS: Step 1. create and
save orderxml.xml
<Order OrderID="1">
<Item>
<ItemNumber>V001</ItemNumber>
<Quantity>1</Quantity>
<Price>299.99</Price>
</Item>
</Order>
Step 2. using the tool in the following location:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64
Open a command prompt, and navigate the preceding directory. The syntax for creating schema is: Xsd.exe C:\temp\orderxml.xml /outputdirectory:c:\temp to create the orderxml.xsd file.
Step 3. Copy all the contents of the orderxml.xsd file to the clipboard, and create a new query window in SQL Server Management Studio, pasting in the content of the clipboard. To create the XML Schema Collection, you need to add the CREATE XML SCHEMA COLLECTION
statement to the beginning of the schema as shown below:
--MSss2012bibleP348.sql for XML Schema Collection OrderInformationSchemaCollection
-- Copied and executed by SHC (Date & Time): 24 April 2015 8:05 AM
USE ScottChangDB
GO
Create XML SCHEMA COLLECTION OrderInformationCollection AS
N'<?xml version="1.0" encoding="utf-16"?>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schema-microsoft-com:xml-msdata">
<xs:element name="Order">
<xs:sequence>
<xs:element name="Item" minOccurs="0" maxOccurs="unbounded".
<xs:complexType>
<xs:sequence>
<xs:element name="ItemNumber" type="xs:string" minOccurs="0" />
<xs:element name="Quantity" type="xs:string" minOccurs="0" />
<xs:element name="price" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="OrderID" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="NewDataSet" msdata" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded'>
<xs:element ref="Order" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>' ;
/* Apply it to the table/columns */
ALTER TABLE ItemInfo
ALTER COLUMN ItemData xml (OrderInformationCollection)
GO
I prepared (i) the orderxml.xml file for Step 1 and Step 2, and (ii) the MSss2012bibleP348.sql file for Step 3. But I am not sure that I can do the Steps (i) and (ii) in my PC that does not have the regular version of Microsoft SQL Server 2012 and Microsoft
Visual Studio 2012. Furthermore, I have difficulties to do Step 2 and Step 3 in my PC that is the part of Windows 7 Lan Computer System in my office: I navigated to my C:\Program Files (x86)\Microsoft SDKs\v7.0A\Bin\, I did not see the x64
thing in the Bin folder, but, I saw the xsd.exe in the Bin folder. If I click the xsd.exe and I get the following in the bottom of the PC screen:
xsd.exe Date modified:12/122011 12:55 PM Date created: 12/12/2011 12:55 PM
Applicaion Size:81.8 KB
Also, I see my PC screen flashes (and it looks like a dialog box with black background to flash for me to type the command) quickly. I am lost completely in this step and I don't understand the whole thing in doing Step 1, Step 2, and Step 3
I briefly summarized/described/presented above.
I need the following help from the experts of XML Schemas and XML Schema Collections in Microsoft SQL Server 2012 Management Studio:
Help #1: I don't understan the concept of Step 1, Step2 and Step 3 to do XML Schema, XSD.exe, and XML Schema Collection in the SQL Server 2012!!?? I just have the SQL Server 2012 Management Studio (SSMS2012) in my PC.
Help #2: How can I execute the xsd.exe in my C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ folder?
Help #3: I just learned the basic things of creating XML SCHEMA COLLECTIONS in my SSMS2012 directly. Is the MSss2012P348.sql (I created and presented above) right for the task? How can I use clipboard to create the XML Schema Collection in my ScottChangDB
database?
Please kindly help and give me the answers/comments for Help #1, Help #2 and Help #3.
Thanks in advance,
Scott ChangHi Scott,
Help #1: I don't understan the concept of Step 1, Step2 and Step 3 to do XML Schema, XSD.exe, and XML Schema Collection in the SQL Server 2012!!?? I just have the SQL Server 2012 Management Studio (SSMS2012) in my PC.
Step1 and Step2 not that related to SQL Server, you can get the XSD from a given XML with an online XSD generator.
Google search: XSD generator
Help #2: How can I execute the xsd.exe in my C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ folder?
Please see the link in the #1
Help #3: I just learned the basic things of creating XML SCHEMA COLLECTIONS in my SSMS2012 directly. Is the MSss2012P348.sql (I created and presented above) right for the task? How can I use clipboard to create the XML Schema Collection in
my ScottChangDB database?
See the syntax and example in
create XML schema collection
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
Multiple operations + complex XSD?
Hey all,
I have a very simple web service(Netbeans --> new web service--> add operation, add operation --> return hardcoded string --> deploy), with two operations. Inputs are strings, outputs are strings. This works fine.
As soon as I change the input of operation1 to HR-XML (a very complex XSD with extensions, which I use jaxb to turn into java classes ), I get a nullPointerException in SoapUI (also an error in NetBeans). The only thing that changes in the WSDL is the <xsd:import namespace = /> section.
As a side note, If I make a new wsdl (input is HR-XML, output is a string) --> new web service from wsdl --> deploy, it works correctly, but I can't figure out how to add another operation to it (that's callable via SOAP).
If anyone can lend any help, please do.
Thanks,
--AdamHere is some more info on the above:
Method that works as strings:_
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService()
public class wsTestWS {
@WebMethod(operationName = "operation1")
public String operation1(@WebParam(name = "input") String input) {
return ("Found operation1");
@WebMethod(operationName = "operation2")
public String operation2(@WebParam(name = "operation2") String operation2) {
return("w00t, operation2");
}and the wsdl:
<definitions targetNamespace="http://work.please.com/" name="wsTestWSService">
−
<types>
−
<xsd:schema>
<xsd:import namespace="http://work.please.com/" schemaLocation="http://hctunx04.us.tgr.net:20010/testWebApp/wsTestWSService?xsd=1"/>
</xsd:schema>
</types>
−
<message name="operation1">
<part name="parameters" element="tns:operation1"/>
</message>
−
<message name="operation1Response">
<part name="parameters" element="tns:operation1Response"/>
</message>
−
<message name="operation2">
<part name="parameters" element="tns:operation2"/>
</message>
−
<message name="operation2Response">
<part name="parameters" element="tns:operation2Response"/>
</message>
−
<portType name="wsTestWS">
−
<operation name="operation1">
<input message="tns:operation1"/>
<output message="tns:operation1Response"/>
</operation>
−
<operation name="operation2">
<input message="tns:operation2"/>
<output message="tns:operation2Response"/>
</operation>
</portType>
−
<binding name="wsTestWSPortBinding" type="tns:wsTestWS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
−
<operation name="operation1">
<soap:operation soapAction=""/>
−
<input>
<soap:body use="literal"/>
</input>
−
<output>
<soap:body use="literal"/>
</output>
</operation>
−
<operation name="operation2">
<soap:operation soapAction=""/>
−
<input>
<soap:body use="literal"/>
</input>
−
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
−
<service name="wsTestWSService">
−
<port name="wsTestWSPort" binding="tns:wsTestWSPortBinding">
<soap:address location="http://hctunx04.us.tgr.net:20010/testWebApp/wsTestWSService"/>
</port>
</service>
</definitions>
and now defined with the HR-XML(changes only):_
code:_
public String operation1(@WebParam(name = "input") org.hr_xml.ns._2007_04_15.NewHireType input) {
return ("Found operation1");
}and the wsdl changes:
(just the import namespaces at the top. my glassfish just died and im having trouble bringing it back to life.) -
How to validate xml againest to xsd
HI,
Xml contains multiple namespaces , I want validate xml againest to xsd. please any one can give help to me.
thanks in adwance,see the sample code which fulfill ur need...
/*--------------Validate.java------------------*/
import java.io.File;
import java.io.StringReader;
import javax.xml.XMLConstants;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;
import org.xml.sax.SAXException;
* This sample shows how new Validator APIs can be used to compile a standalone schema. This
* feature is useful for those applications which are developing schema and wants to check
* the validity of it as per the rules of schema language.
* Once an application has <code>Schema</code> object, it can be used to create
* <code>Validator</code> which can be used to validate an instance document against the
* schema or set of schemas this <code>Schema</code> object represents.
public class Validate
private static final boolean DEBUG = System.getProperty("debug") != null ? true : false;
/** Parser the given schema and return in-memory representation of that
* schema. Compiling the schema is very simple, just pass the path of schema
* to <code>newSchema()</code> function and it will parse schema, check the
* validity of schema document as per the schema language, compute in-memory
* representation and return it as <code>Schema</code> object. Note that If
* schema imports/includes other schemas, those schemas will be parsed too.
* @param String path to schema file
* @return Schema in-memory representation of schema.
public static Schema compileSchema(String schema) throws SAXException
//Get the SchemaFactory instance which understands W3C XML Schema language
SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
if(DEBUG)
System.out.println("schema factory instance obtained is " + sf);
return sf.newSchema(new File(schema));
}//compileSchema
* @param args the command line arguments
public static void main(String[] args)
try
//parse schema first, see compileSchema function to see how
//Schema object is obtained.
Schema schema = compileSchema("NBO.XSD");
//this "Schema" object is used to create "Validator" which
//can be used to validate instance document against the schema
//or set of schemas "Schema" object represents.
Validator validator = schema.newValidator();
//set ErrorHandle on this validator
validator.setErrorHandler(new MyErrorHandler());
//Validate this instance document against the instance document supplied
validator.validate(new StreamSource("NBWO.XML"));
} catch(Exception ex)
ex.printStackTrace();
System.out.println("GET CAUSE:");
ex.getCause().fillInStackTrace();
/*---------MyErrorHandler()-----------*/
* MyErrorHandler.java
public class MyErrorHandler implements org.xml.sax.ErrorHandler
/** Creates a new instance of MyErrorHandler */
public MyErrorHandler()
public void error(org.xml.sax.SAXParseException sAXParseException) throws org.xml.sax.SAXException
System.out.println("ERROR: " + sAXParseException.toString());
System.out.println("get error Msg : "+sAXParseException.getMessage());
public void fatalError(org.xml.sax.SAXParseException sAXParseException) throws org.xml.sax.SAXException
System.out.println("FATAL ERROR: " + sAXParseException.toString());
System.out.println("get Error Message : "+sAXParseException.getMessage());
public void warning(org.xml.sax.SAXParseException sAXParseException) throws org.xml.sax.SAXException
System.out.println("WARNING: " + sAXParseException.toString());
}With Cheers,
Prasanna T -
Hi,
How to convert (.xml) XML file into (.xsd.) XML Schema.
Please help me out.
Thanks,
SubbaRao.Hi,
Actually We have to generate reports using XML Publisher.For this we gone through the documents provided by XML Publisher.As per Pusher documents we followed the steps.
Taken the Oracle Apps Report.Converted into .xml file then converted into XML Schema (.xsd) by using Stylus studio.
Now we are not able to create .rtf file.
please help us.
Thanks,
Venkat. -
Extending the Resource XML Schema XDBResource.xsd
Hi,
Is anybody could share an expirience about extending
the Resource XML Schema XDBResource.xsd ?
I want to use XML DB as document repository.
I want to use some application parameters (for
example document varchar id and so on) as resource
properties. I read from Oracle documentation, that
one way is to extend the Resource XML Schema XDBResource.xsd.
Users will put documents using WebDAV, so new schema
should be used default instead of XDBResource.xsd.
Is it possible ?
Thanks in advance
ViacheslavThos is an error in the documentation. Extending the Resource Schema is not currently supported. We are considering this for a future release of the product. XML DB does allow small amounts of user defined meta data to be added to a Resource.....
For Instance Given the following package
create or replace package xdb_namespaces
as
RESOURCE_NAMESPACE constant VARCHAR2(128) := 'http://xmlns.oracle.com/xdb/XDBResource.xsd';
METADATA_NAMESPACE constant VARCHAR2(128) := 'http://xmlns.oracle.com/xdb/userMetaData';
RESOURCE_PREFIX_R constant VARCHAR2(128) := 'xmlns:r="' || RESOURCE_NAMESPACE || '"';
METADATA_PREFIX_M constant VARCHAR2(128) := 'xmlns:m="' || METADATA_NAMESPACE || '"';
end;
select * from all_errors where owner = 'XDB'
create or replace public synonym XDB_NAMESPACES for XDB_NAMESPACES
grant execute on XDB_NAMESPACES to public
The following procedure can add metadata to the ANY defined by the current resource Schema
procedure addUserMetaDataNode(OID varchar2)
as
metadata_xml XMLTYPE := XMLTYPE('<m:UserMetaData ' || XDB_NAMESPACES.METADATA_PREFIX_M || '/>');
begin
update /*+ NO_TRIGGER */ XDB.XDB$RESOURCE r
set r.xmldata.RESEXTRA = metadata_xml.getClobVal()
where sys_nc_oid$ = hextoraw(OID)
and existsNode
object_value,
'/r:Resource/r:Contents',
XDB_NAMESPACES.RESOURCE_PREFIX_R
) = 1
and existsNode
object_value,
'/r:Resource/m:UserMetaData',
XDB_NAMESPACES.RESOURCE_PREFIX_R || ' ' || XDB_NAMESPACES.METADATA_PREFIX_M
) = 0;
end;
Note that this is not a SUPPORTED method of doing this.. Once the UserMetaDataNode has been added additional metadata can be added using updateXML with an XPATH that targets the UserMetaData node.
A Future release of XML DB will provide a facitlity to attach a row in a schema based XML table, containing user defined meta data to a resoure, in the same way that the defaultTable mechanisim allows the content of a resource to be stored in an XMLType table.
Maybe you are looking for
-
I have 2 apple IDs and want to merge them how do I do this?
I have 2 apple IDs and want to merge them how do I do this?
-
Change APEX from HTTP-Server to 11g
Hello together I installed an Oracle 10gR2 Database and Apex 3.1 is running on the HTTP-Server (from the 10gR2 Companion CD). Now i want to upgrade to 11g and use the embedded PL/SQL Gateway so that i can turn off the HTTP-Server. Have you got any ti
-
How to calculate tax in me49 price
hi guys, I want to change the standard me49 transaction. the reason is this the rate value it is giving is without excise and tax means flat rate. but i hav to showhere the rate including tax excise etc etc. Can you please give me brief
-
Reservation is deleted when PM order is TECO
Dear Experts, I have a PM order which has been TECOed, I noticed that the components' reservation were set to deleted.. Is this right? Thanks!
-
Saving a form on click of a button.
Hi, I need the script to save the form on click of button.I've tried to use "app.execMenuItem("Save");".But it is not working. Is there any equvalent for this command in livecycle forms? Please Help..