Element's substitution group with Xerces Schema API
Hi,
I am using Xerces Schema API and I can not figure out how to find an element's substitution group. There are some methods in XSElementDeclaration that look like they could help but they return null even if globally defined element has a substitution group. Any help would be greatly appreciated.
Thanks
Upps...please ignore this post.
Similar Messages
-
Problem with abstract complex type in substitution group.
Hi all,
I have three xsds, A, B, C.XSD respectively. A.xsd:There is a substitution group and its complex type declared as abstract and element that uses them. B.xsd has the same structure as A except that it has complex type derived from complex type from A. C.xsd is same as B.xsd.
The xml files of A and B validate but not of C.
It gives the following error:
This file is not valid. Unexpected element'signatureString' in element author. Expected signatureString,signatureText.
Any help at the earliest is greatly appreciated.
the code of each xsds is as follows:
A.XSD:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:PARTICIPATION="Participation" targetNamespace="Participation">
<!-- ================================================= -->
<!-- Package: Participation -->
<!-- ================================================= -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Class: <<ST>> SignatureString -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<xs:element name="signatureString" type="PARTICIPATION:SignatureString" substitutionGroup="PARTICIPATION:signatureText"/>
<xs:complexType name="SignatureString">
<xs:complexContent>
<xs:extension base="PARTICIPATION:SignatureText">
<xs:attribute name="value" type="xs:string" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Class: SignatureText -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<xs:element name="signatureText" type="PARTICIPATION:SignatureText" abstract="true"/>
<xs:complexType name="SignatureText" abstract="true"/>
</xs:schema>
B.xsd:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:CM3202="Common3202" xmlns:PARTICIPATION="Participation" targetNamespace="Common3202">
<xs:import namespace="Participation" schemaLocation="Datatypes3203/RDT/Participation.xsd"/>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Class: <<Participation>> PractitionerParticipation -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<xs:element name="practitionerParticipation" type="CM3202:PractitionerParticipation" abstract="true"/>
<xs:complexType name="PractitionerParticipation" abstract="true">
<xs:sequence>
<!--xs:element name="signatureText" type="PARTICIPATION:SignatureText" minOccurs="0"/-->
<xs:element ref="PARTICIPATION:signatureText"/>
</xs:sequence>
</xs:complexType>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Class: <<Participation>> Author -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<xs:element name="author" type="CM3202:Author" substitutionGroup="CM3202:practitionerParticipation"/>
<xs:complexType name="Author">
<xs:complexContent>
<xs:extension base="CM3202:PractitionerParticipation"/>
</xs:complexContent>
</xs:complexType>
</xs:schema>
C.xsd
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:VS3203="VitalSigns3203" xmlns:CM3202="Common3202" targetNamespace="VitalSigns3203">
<xs:import namespace="Common3202" schemaLocation="Common3202.xsd"/>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Class: <<Observation>> VitalSignsObservationEvent -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<xs:element name="vitalSignsObservationEvent" type="VS3203:VitalSignsObservationEvent"/>
<xs:complexType name="VitalSignsObservationEvent">
<xs:sequence>
<xs:element name="author" type="CM3202:Author" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>Hi all,
This seems to be a bug unless someone of you have a solution.
Also I ma new to xml/xsd world, so could someone please give the differences between xsi:type vs substitution groups with both element and complex type being abstract. Can this scenario be accomplished by usuage of choice groups.
Also can anyone suggest any other good xml forums.
Please let me know.
Thanks in advance. -
Hi,
Can anybody please explain what are ***Substitution Groups*** in XML Schema with a simple example as this concept is little bit fuzzy for me.
Thanks.This concerns with internationalization (i18N):
http://www.w3schools.com/schema/schema_complex_subst.asp -
JAXB: Abstract Types and Substitution Group Errors
I am using several schemas as defined below:
Schema 1 defines an abstract type
Schema 2 extends abstract type
Schema 3 makes reference to abstract type in 1 and is using substitution groups on the abstarct type
The error only occurs when the element is Abstract and what extends
the abstract element specify a substitution group (which I believe is
correct according to
http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#abstract). I can't
remove the substitution group because declaring the element as abstract
requires this. Is there a way to fix this?
code that generates error:
When attempting to do a JAXBContext jaxbContext = JAXBContext.newInstance(Schema3.class) I get the following error
Exception in thread "main" com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
There's no ObjectFactory with an @XmlElementDecl for the element {[http://test.com/FeatureBase.xsd|http://seams.csp.com/FeatureBase.xsd]}FeatureBase.
this problem is related to the following location:
at com.test.blah
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:448)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:297)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:214)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:375)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)Hi all,
This seems to be a bug unless someone of you have a solution.
Also I ma new to xml/xsd world, so could someone please give the differences between xsi:type vs substitution groups with both element and complex type being abstract. Can this scenario be accomplished by usuage of choice groups.
Also can anyone suggest any other good xml forums.
Please let me know.
Thanks in advance. -
Substitution groups support?
Does xmlbeans support substitution groups in xml schema? I read xml beans documentation
saying it has 100% xml schema support. But I got the following error when I use
xmlbeans to generate java classes:
[xmlbean] ObjectLinking.xsd:27: warning: Element substitution groups not supported
in this release
I appreciate if anyone can help me on this.Does xmlbeans support substitution groups in xml schema? I read xml beans documentation
saying it has 100% xml schema support. But I got the following error when I use
xmlbeans to generate java classes:
[xmlbean] ObjectLinking.xsd:27: warning: Element substitution groups not supported
in this release
I appreciate if anyone can help me on this. -
Xmlbeans and substitution groups
I am working with the new GoogleEarth .xsd files and I have compiled them using xmlbeans. There are a number of elements that make use of substitutiongroups. for example:
<element name="Placemark" type="kml:PlacemarkType"
substitutionGroup="kml:AbstractFeatureGroup"/>
<complexType name="PlacemarkType" final="#all">
<complexContent>
<extension base="kml:AbstractFeatureType">
<sequence>
<element ref="kml:AbstractGeometryGroup" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>how do I "replace" the substitution group with the actual element so that instead of:
<AbstractGeometryGroup>
<Point>
<extrude>true</extrude>
<altitudeModeGroup>
<altitudeMode>relativeToGround</altitudeMode>
</altitudeModeGroup>
<coordinates>32.18582907768492, -107.85250271267361, 50</coordinates>
</Point>
</AbstractGeometryGroup>I would get just <Point>
<extrude>true</extrude>
<altitudeModeGroup>
<altitudeMode>relativeToGround</altitudeMode>
</altitudeModeGroup>
<coordinates>32.18582907768492, -107.85250271267361, 50</coordinates>
</Point>I have tried casting, the substitute method, and the replace method to no avail. I think casting is the right way to go, but I throw a class cast exception when I try to cast. Here is my code
PointType point = (PointType)placemark.addNewAbstractGeometryGroup();
AltitudeModeDocument altModeDoc = AltitudeModeDocument.Factory.newInstance();
AltitudeModeEnumType.Enum altModeEnum = AltitudeModeEnumType.Enum.forString("relativeToGround");
altModeDoc.setAltitudeMode(altModeEnum);
point.setAltitudeModeGroup(altModeDoc);
point.setExtrude(true);
Vector<String> coordinates = new Vector<String>(3);
coordinates.add("32.18582907768492,");
coordinates.add("-107.85250271267361,");
coordinates.add("50");
point.setCoordinates(coordinates);With the cast exception thrown on the first line. Which I would understand, but I can call
placemark.setNewAbstractGeometryGroup(), which takes a AbstractGeometryType as an argument and will accept a PointType as an argument which I assume means PointType isa AbstractGeometryType. Is the issue that that I am casting the wrong direction? Any help is greatly appreciated. I would much prefer to build the xml messages using the beans rather then hacking together a StringBuffer.Hi Pon -
Do you mean groups of users or group of pages?
If you mean groups of users, you can create your sub-groups as a regular groups, and then when assigning users to your Main Finance group ... add the 2 groups which are your subGroups.
If you are talking about the Portal Page Group structure, you cannot nest page groups, but you can create pages and subpages.
Hope this helps,
Candace -
Is element/type substitution supported?
Hi,
I have a schema that uses element/type substitution group. When I try to use these elements/types in <assign> section, I always get error saying type not found.
I'm wondering if the element/type substitution is supported? If yes, is there any samples?
I'm using PM2.1.1/Designer 0.9.10
Thanks in advance.The WSDL of the EachService is test.wsdl (test1.xsd, test2.xsd) in the WSDLTest.jar ZIP file that I sent to [email protected] yesterday.
-
SAB BO 4.1 SP1
Does it have an RESTful API to schedule a Webi report with the parameter to specify a group of users ("Schedule For" to "Schedule for specified users and user groups" with one or more users/groups)?Hello Ricardo,
have you try a call like this one ?
<schedule>
<name>"test"</name>"
<format type=\"webi\"/>
<destination>
<inbox>
<to>userId1,userId2,userId3,groupId1,groupId12</to>
</inbox>
</destination>
</schedule>
Regards
Stephane -
Grouping Checks, All element from a group present with all option available in group
Respected Techie....May i get help on this how to design a query for below condition, if possible.declare @myTable table (PT varchar(50), MK varchar(50), MO varchar(50),
YR varchar(50), REMARKS varchar(50), PART varchar(50))
Table Structure:-
insert into @myTable values ('Battery' ,'Dodge','Ram 50', '1989', 'Four Wheel Drive', '51C') --This will be in Output, as Group of PT, MK,MO,YR have 2 remarks and part are available with both the remarks
insert into @myTable values ('Battery' ,'Dodge','Ram 50', '1989', 'Rear Wheel Drive', '51X') --This will be in Output, as Group of PT, MK,MO,YR have 2 remarks and part are available with both the remarks
insert into @myTable values ('Battery' ,'Dodge','Ram 50', '1989', 'Rear Wheel Drive', '51C') --This will be in Output, as Group of PT, MK,MO,YR have 2 remarks and part are available with both the remarks
insert into @myTable values ('Battery' ,'Dodge','Ram 50', '1989', 'Four Wheel Drive', '51X') --This will be in Output, as Group of PT, MK,MO,YR have 2 remarks and part are available with both the remarks
insert into @myTable values ('Air Filter','Dodge','Colt', '1990', 'Four Wheel Drive', '46264') -- This will be in Output, as Group of PT, MK,MO,YR have 2 remarks and part are available with both the remarks
insert into @myTable values ('Air Filter','Dodge','Colt', '1990', 'Four Wheel Drive', '875') --This will be in Output, as Group of PT, MK,MO,YR have 2 remarks and part are available with both the remarks
insert into @myTable values ('Air Filter','Dodge','Colt', '1990', 'Front Wheel Drive','46264') --This will be in Output, as Group of PT, MK,MO,YR have 2 remarks and part are available with both the remarks
insert into @myTable values ('Air Filter','Dodge','Colt', '1990', 'Front Wheel Drive','875') --This will be in Output, as Group of PT, MK,MO,YR have 2 remarks and part are available with both the remarks
insert into @myTable values ('Bull Bar' ,'Ford','F-250', '1997', 'Four Wheel Drive', '1330371971') --All element from a group of PT,MK,MO,YR should be Removed from output, as Part 1330371971 is not available with all the remarks available in a group. (1330371971 is not available with Rear Wheel Drive.)
insert into @myTable values ('Bull Bar' ,'Ford','F-250', '1997', 'Four Wheel Drive', 'NR-301') --All element from a group of PT,MK,MO,YR should be Removed from output, as Part 1330371971 is not available with all the remarks available in a group. (1330371971 is not available with Rear Wheel Drive.)
insert into @myTable values ('Bull Bar' ,'Ford','F-250', '1997', 'Rear Wheel Drive', 'NR-301') --All element from a group of PT,MK,MO,YR should be Removed from output, as Part 1330371971 is not available with all the remarks available in a group. (1330371971 is not available with Rear Wheel Drive.)
insert into @myTable values ('Controls', 'Cadillac','Chasis','1992', 'Rear Wheel Drive', 'CK620158') --Removed from output, as group by PT,MK,MO,YR contain only 1 remarks and 1 distinct part
insert into @myTable values ('Controls', 'Cadillac','Chassis','1992','Rear Wheel Drive', 'CK620159') --Removed from output, as group by PT,MK,MO,YR contain only 1 remarks and 1 distinct partThank You Very MuchIt would certainly help with some more details on the business rules.
I am puzzled over these two rows:
insert into @myTable values ('Bull Bar' ,'Ford','F-250', '1997', 'Four Wheel Drive', 'NR-301')
--All element from a group of PT,MK,MO,YR should be Removed from output, as Part 1330371971 is not available with all the remarks available in a group. (1330371971 is not available with Rear Wheel Drive.)
insert into @myTable values ('Bull Bar' ,'Ford','F-250', '1997', 'Rear Wheel Drive', 'NR-301')
--All element from a group of PT,MK,MO,YR should be Removed from output, as Part 1330371971 is not available with all the remarks available in a group. (1330371971 is not available with Rear Wheel Drive.)
Overlooking the fact that the part number in the comment does not match, how this is different from parts 51C and 51X which also has a Four Wheel Drive and a Rear Wheel Drive?
I guess the real question is how do I know what "all available options" are? I would kind of expect a table which defines this.
And please don't forget to tell us which version of SQL Server you are using!
Erland Sommarskog, SQL Server MVP, [email protected] -
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. -
XSLT with namespaces/schema
Hi everybody !
I've a problem transforming a XML file that has a root element containing a reference to a XSD schema.
<myxml xmlns="http://www.myxml.de" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.myxml.de myxml.xsd">
The XSLProcessor does not accept the attribute in the root element but always complains that to be empty :-((.
I was told, that one of the few processors that could handle Schema and namespaces was the Oracle v2 lib.
So I'm trying to transform with the following piece of code and ORACLE v2 parser lib:
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
public class SimpleTrAX
public static void main( String[] args )
try
File xslIn = new File( "D:/A.xslt" );
File xmlIn = new File( "D:/B.xml" );
File xmlOut = new File( "D:/C.xml" );
// System.setProperty( "javax.xml.parsers.DocumentBuilderFactory", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
// System.setProperty( "javax.xml.parsers.DocumentBuilderFactory", "org.apache.crimson.jaxp.DocumentBuilderFactoryImpl");
// System.setProperty( "javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
// System.setProperty( "javax.xml.parsers.SAXParserFactory", "org.apache.crimson.jaxp.SAXParserFactoryImpl");
// System.setProperty( "javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.TransformerFactoryImpl");
xmlOut.createNewFile();
TransformerFactory transFact = TransformerFactory.newInstance();
StreamSource xslStream = new StreamSource( xslIn );
StreamSource xmlStream = new StreamSource( xmlIn );
FileOutputStream fileOut = new FileOutputStream( xmlOut );
StreamResult xmlResult = new StreamResult( fileOut );
Transformer trans = transFact.newTransformer( xslStream );
trans.transform( xmlStream, xmlResult );
catch (Exception e) { System.out.println( e ); }
I haven't found any attributes or properties to set the transformer or it's factory to be namespace aware. Any help or helpful hint will be highly appreciated ! Thanks in advance !
Best regards
JuergenThanks for your quick answer !
But including the namespace which is part of the root element in file A into the transforming stylesheet (as you proposed) that should produce result file C seems to
mislead the transformer:
It now validates the root tags of the transformation script against the wrong namespace/schema:
<xsl:stylesheet version="1.0"
xmlns="http://www.myxml.de"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.myxml.de myxml.xsd"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="myxml"> <!-- Match root of source doc A -->
<root_of_result_document_C>
<!-- apply something else -->
</root_of_result_document_C>
</xsl:template>
</xsl:stylesheet>
I now get an error (comprehensible for me):
"Root element 'root_of_result_document_C' not defined in DTD/Schema"
??? -
Error Message ORA-31043: Element 'person' not globally defined in schema
Hello All,
We have registered 2 xsd documents as follows..
DECLARE
lc_test_xsd CLOB;
BEGIN
lc_test_xsd := '<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.xyz.com/cicat/types/basictypes/2/0"
targetNamespace="http://www.xyz.com/cicat/types/basictypes/2/0"
version="2.0">
<simpleType name="LastNamePrefix">
<annotation>
<documentation>
Additional word to last name (name prefix) corresponding to SAP HR Core
Table T535N; V.
</documentation>
</annotation>
<restriction base="tns:String255" />
</simpleType>
<simpleType name="CountryID">
<annotation>
<documentation>
Codes for the representation of country names according to ISO 3166.
</documentation>
</annotation>
<restriction base="string">
<maxLength value="2" />
</restriction>
</simpleType>
<simpleType name="LocationCode">
<annotation>
<documentation>
Code of a location, e.g. Fe, Wa2 or Kor.
</documentation>
</annotation>
<restriction base="string">
<maxLength value="4" />
</restriction>
</simpleType>
<simpleType name="GenderCode">
<annotation>
<documentation>
Code of the gender: male, female, unknown. Unknown is used if the value is
unknown or must not be stored due to legal restrictions.
</documentation>
</annotation>
<restriction base="string">
<enumeration value="male" />
<enumeration value="female" />
<enumeration value="unknown" />
</restriction>
</simpleType>
<simpleType name="String255">
<annotation>
<documentation>
String with 255 characters max
</documentation>
</annotation>
<restriction base="string">
<maxLength value="255" />
<minLength value="1" />
</restriction>
</simpleType>
<simpleType name="RB-CostCenter">
<annotation>
<documentation>
Cost Center
</documentation>
</annotation>
<restriction base="string">
<minLength value="3" />
<maxLength value="6" />
</restriction>
</simpleType>
<simpleType name="OrgUnitName">
<annotation>
<documentation>
Name of the Organizational Unit
</documentation>
</annotation>
<restriction base="string">
<minLength value="1" />
<maxLength value="18" />
</restriction>
</simpleType>
<complexType name="StringMCA">
<annotation>
<documentation>
Multi Country String. Strings, which must be stored in ASCII code and
country specific. The subelement ASCIIString contains the string encoded
with ASCII. The subelement countrySpecificString allows country specific
encoding.
</documentation>
</annotation>
<sequence>
<element name="asciiString" type="tns:String255" minOccurs="0" />
<element name="countrySpecificString" type="tns:String255" />
</sequence>
</complexType>
<simpleType name="OrgUnitID">
<annotation>
<documentation>
ID of the Organizational Unit
</documentation>
</annotation>
<restriction base="unsignedInt">
<totalDigits value="8" />
</restriction>
</simpleType>
<simpleType name="GlobalID">
<annotation>
<documentation>
Global unique identifier of persons at xyz
</documentation>
</annotation>
<restriction base="unsignedInt">
<totalDigits value="8" />
</restriction>
</simpleType>
<simpleType name="CiCatPersonID">
<annotation>
<documentation>
CI-CAT Identifier of Persons (CiCat-PID). Unique identifier of a person
in CI-CAT
</documentation>
</annotation>
<restriction base="unsignedInt">
<totalDigits value="20" />
</restriction>
</simpleType>
<simpleType name="CiCatAccountID">
<annotation>
<documentation>
CI-CAT Identifier of AD Accounts (CiCat-Ben-Sid). Unique identifier of
AD Accounts in CI-CAT.
</documentation>
</annotation>
<restriction base="unsignedInt">
<totalDigits value="20" />
</restriction>
</simpleType>
<simpleType name="PersonnelActionTypeCode">
<annotation>
<documentation>
The operation that was performed on the person: entry, data change,
re-entry (into company), exit (out of company)
</documentation>
</annotation>
<restriction base="string">
<enumeration value="entry" />
<enumeration value="data change" />
<enumeration value="re-entry" />
<enumeration value="exit" />
</restriction>
</simpleType>
<simpleType name="ContractStatus">
<annotation>
<documentation>
Contract Status: active, inaktive, resigned, retired
</documentation>
</annotation>
<restriction base="string">
<enumeration value="retired">
<annotation>
<documentation>
End of contract relationship because of retirement
</documentation>
</annotation>
</enumeration>
<enumeration value="resigned">
<annotation>
<documentation>
End of contract because of quitting
</documentation>
</annotation>
</enumeration>
<enumeration value="inactive">
<annotation>
<documentation>
Incactive contract relationship, e.g. motherhood, suspension
</documentation>
</annotation>
</enumeration>
<enumeration value="active">
<annotation>
<documentation>
Normal contract status
</documentation>
</annotation>
</enumeration>
<enumeration value="deleted">
<annotation>
<documentation>
Contract physically deleted in the source system
</documentation>
</annotation>
</enumeration>
</restriction>
</simpleType>
<simpleType name="KnownAssociateCode">
<annotation>
<documentation>
Describes status of person to xyz: internal/external/fixed-term
</documentation>
</annotation>
<restriction base="string">
<enumeration value="External" />
<enumeration value="Internal" />
<enumeration value="Fixed Term" />
<enumeration value="unknown" />
</restriction>
</simpleType>
<simpleType name="AssociateCode">
<annotation>
<documentation>
Describes status of person to xyz: union of known values plus free string
for not yet known types
</documentation>
</annotation>
<union memberTypes="tns:KnownAssociateCode string" />
</simpleType>
<simpleType name="KnownExternalRelationType">
<annotation>
<documentation>
Describes relation (contract relation) of external person to xyz:
contractor/customer/supplier/subsidiary/selfregistered
</documentation>
</annotation>
<restriction base="string">
<enumeration value="Contractor" />
<enumeration value="Customer" />
<enumeration value="Supplier" />
<enumeration value="Subsidiary" />
<enumeration value="Selfregistered" />
<enumeration value="unknown" />
</restriction>
</simpleType>
<simpleType name="ExternalRelationType">
<union memberTypes="tns:KnownExternalRelationType string" />
</simpleType>
<simpleType name="ValidityState">
<annotation>
<documentation>
If an attribute was taken over by an authoritative source such as HR-MDS or
WOM. Set to "Valid" to indicate that the value was taken over from the
source and is therefore valid. Set to "Invalid" if the source indicates the
value is no longer value, e.g. because it got deleted. Otherwise set to
"Unknown", e.g. when the value was entered manually.
</documentation>
</annotation>
<restriction base="string">
<enumeration value="Valid" />
<enumeration value="Invalid" />
<enumeration value="Unknown" />
</restriction>
</simpleType>
<complexType name="HrPersonnelId">
<sequence>
<element name="hrSourceSystem">
<annotation>
<documentation>
Name of HR source system
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<minLength value="1" />
<maxLength value="20" />
</restriction>
</simpleType>
</element>
<element name="hrPersonnelId">
<annotation>
<documentation>
ID of person in HR source system
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<minLength value="1" />
<maxLength value="20" />
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
<complexType name="AccountType">
<annotation>
<documentation>
Types of Accounts: Three main categories are known: Person, resource or
service account. A person account represents a single natural person. A
resource account represents a resource such as a printer, a computer or a
meeting room. Service Accounts represent everything else. The can be used
for example for technical users or group accounts. Both resource and service
accounts have an owner that is responsible for them. Each account type has
subtypes for further categorization.
</documentation>
</annotation>
<choice>
<element name="personAccount" type="tns:PersonAccountType" />
<element name="resourceAccount" type="tns:ResourceAccountType" />
<element name="serviceAccount" type="tns:ServiceAccountType" />
</choice>
</complexType>
<simpleType name="KnownPersonAccountType">
<annotation>
<documentation>
Pre-defined types of Person Accounts
</documentation>
</annotation>
<restriction base="string">
<enumeration value="Office" />
<enumeration value="Admin" />
<enumeration value="Test" />
<enumeration value="unknown" />
</restriction>
</simpleType>
<simpleType name="PersonAccountType">
<union memberTypes="tns:KnownPersonAccountType string" />
</simpleType>
<simpleType name="KnownResourceAccountType">
<annotation>
<documentation>
Pre-defined types of Resource Accounts
</documentation>
</annotation>
<restriction base="string">
<enumeration value="Room" />
<enumeration value="PC" />
<enumeration value="Printer" />
<enumeration value="unknown" />
</restriction>
</simpleType>
<simpleType name="ResourceAccountType">
<union memberTypes="tns:KnownResourceAccountType string" />
</simpleType>
<simpleType name="KnownServiceAccountType">
<annotation>
<documentation>
Pre-defined Types of Service Accounts
</documentation>
</annotation>
<restriction base="string">
<enumeration value="Group" />
<enumeration value="Machine" />
<enumeration value="Support" />
<enumeration value="System" />
<enumeration value="unknown" />
</restriction>
</simpleType>
<simpleType name="ServiceAccountType">
<union memberTypes="tns:KnownServiceAccountType string" />
</simpleType>
<simpleType name="ActionType">
<annotation>
<documentation>
Defines the action that was performed on the object.
</documentation>
</annotation>
<restriction base="string">
<enumeration value="Create" />
<enumeration value="Update" />
<enumeration value="Delete" />
</restriction>
</simpleType>
<simpleType name="LegalEntityId">
<annotation>
<documentation>
ID of a legal entity
</documentation>
</annotation>
<restriction base="unsignedInt">
<totalDigits value="8" />
</restriction>
</simpleType>
</schema>
DBMS_XMLSCHEMA.REGISTERSCHEMA (schemaurl => 'BasicTypes.xsd',
schemadoc => lc_test_xsd);
DBMS_OUTPUT.PUT_LINE('BasicTypes.xsd registration successfully completed');
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('BasicTypes.xsd registration failed '||SQLERRM);
END;
/2nd xsd..
-- register PersonTypes.xsd schema
DECLARE
lc_person_xsd CLOB;
BEGIN
lc_person_xsd
:= '<?xml version="1.0" encoding="UTF-8"?>
<!--
Change History:
-->
<!--
This schema contains all types that represent objects (i.e. Person and ADAccount).
-->
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.xyz.com/cicat/types/persontypes/2/0"
xmlns:basic="http://www.xyz.com/cicat/types/basictypes/2/0"
targetNamespace="http://www.xyz.com/cicat/types/persontypes/2/0"
version="2.0">
<import namespace="http://www.xyz.com/cicat/types/basictypes/2/0" schemaLocation="BasicTypes.xsd"/>
<complexType name="ADAccount">
<annotation>
<documentation>
Active directory account of a person (also known as NT or Windows account)
</documentation>
</annotation>
<sequence>
<element name="cicatAccountId" type="basic:CiCatAccountID">
<annotation>
<documentation>
CICAT internal ID of account (CI-CAT Ben SID)
</documentation>
</annotation>
</element>
<element name="domain" type="basic:String255">
<annotation>
<documentation>
NT domain of the userID, e.g. "de", "emea"
</documentation>
</annotation>
</element>
<element name="userID" type="basic:String255">
<annotation>
<documentation>
NT userID e.g. "xyz5mum" without domain (NT-SID)
</documentation>
</annotation>
</element>
<element name="guid" type="basic:String255">
<annotation>
<documentation>
Active Directory GUID of account.
</documentation>
</annotation>
</element>
<element name="isMasterAccount" type="boolean"
default="false" minOccurs="0">
<annotation>
<documentation>
A person can have several accounts. One of them is marked as the
master account. The master account is the account which is mainly
used by the user.
</documentation>
</annotation>
</element>
<element name="accountType" type="basic:AccountType">
<annotation>
<documentation>
Types of Accounts: Three main categories are known: Person, resource
or service account. A person account represents a single natural
person. A resource account represents a resource such as a printer,
a computer or a meeting room. Service Accounts represent everything
else. The can be used for example for technical users or group
accounts. Both resource and service accounts have an owner that is
responsible for them. Each account type has subtypes for further
categorization.
</documentation>
</annotation>
</element>
</sequence>
</complexType>
<complexType name="Person">
<annotation>
<documentation>
All attributes a CI-CAT person record can contain
</documentation>
</annotation>
<sequence>
<element name="globalID" type="basic:GlobalID" minOccurs="0">
<annotation>
<documentation>
Globally unique identifier of a person at xyz. This ID is defined
by HR MDS.
</documentation>
</annotation>
</element>
<element name="cicatPID" type="basic:CiCatPersonID">
<annotation>
<documentation>
Unique identifier of person in CI-CAT.
</documentation>
</annotation>
</element>
<element name="hrPersonnelId" type="basic:HrPersonnelId" minOccurs="0">
<annotation>
<documentation>
Personnel ID of person in an HR system. The personnel ID is unique
throughout one system. But different systems can use the same ID.
</documentation>
</annotation>
</element>
<element name="title" type="basic:String255"
minOccurs="0">
<annotation>
<documentation>
Title of the person. In some countries and HR-MDS this field is used
for the academic title. In other countries it is used for the job
title.
</documentation>
</annotation>
</element>
<element name="firstName" type="basic:StringMCA">
<annotation>
<documentation>
First name of the person
</documentation>
</annotation>
</element>
<element name="middleName" type="basic:StringMCA" minOccurs="0">
<annotation>
<documentation>
Middle name(s) of the person
</documentation>
</annotation>
</element>
<element name="lastNameAddOn" type="basic:String255"
minOccurs="0">
<annotation>
<documentation>
Additional word to surname (name prefix)
corresponding to SAP HR Core Table T535N; V.
</documentation>
</annotation>
</element>
<element name="lastName" type="basic:StringMCA">
<annotation>
<documentation>
Last names of the person.
</documentation>
</annotation>
</element>
<element name="displayName" type="basic:String255" minOccurs="0">
<annotation>
<documentation>
Display name of the person. This attribute is calculated from the
name, the department. In case of external users it also contains
an external flag and the name of the company. This field is
calculated by CI-CAT.
</documentation>
</annotation>
</element>
<element name="gender" type="basic:GenderCode" minOccurs="0">
<annotation>
<documentation>
Gender of the person
</documentation>
</annotation>
</element>
<element name="orgUnitID" type="basic:OrgUnitID" minOccurs="0">
<annotation>
<documentation>
ID of Organization unit (determined by C/AOO). This ID is taken over
from WOM.
</documentation>
</annotation>
</element>
<element name="orgUnitIDValidity" type="basic:ValidityState" minOccurs="0">
<annotation>
<documentation>
Defines if the attribute orgUnitID was validated by an authoritative
source. The default value is "Unknown".
VALID:
- orgUnitID is linked with WOM reference and orgUnitID is active in WOM
- orgUnitID is linked with Exception Organization list maintained in
CI-CAT by C/AOO. orgUnitID is active in with Exception Organization list
INVALID:
- orgUnitID is linked with WOM reference and orgUnitID is inactive in WOM
- orgUnitID is linked with Exception Organization list maintained in CI-CAT
by C/AOO. orgUnitID is inactive in with Exception Organization list
UNKNOWN:
- orgUnitID is not linked with WOM reference or Exception Organization
list. Active state of the department is not known.
</documentation>
</annotation>
</element>
<element name="orgUnitName" type="basic:OrgUnitName">
<annotation>
<documentation>
Unit Code (determined by C/AOO) of the organizational office, e.g.
Department, group, Project.
</documentation>
</annotation>
</element>
<element name="costCenter" type="basic:RB-CostCenter">
<annotation>
<documentation>
Cost center the person is assigned to.
</documentation>
</annotation>
</element>
<element name="costCenterValidity" type="basic:ValidityState" minOccurs="0">
<annotation>
<documentation>
Defines if the attribute costCenter was validated by an authoritative
source. The default value is "Unknown".
</documentation>
</annotation>
</element>
<element name="email" type="basic:String255"
minOccurs="0">
<annotation>
<documentation>
Primary email of person
</documentation>
</annotation>
</element>
<element name="legalEntity" type="basic:LegalEntityId" minOccurs="0">
<annotation>
<documentation>
ID of a legalEntity. Legal Entity List will be
retrieved from CI-CAT.
</documentation>
</annotation>
</element>
<element name="officeLocation" type="basic:LocationCode" minOccurs="0">
<annotation>
<documentation>
The office location where the person is currently working,
e.g. Fe, Kor, Wa2. Maintained in CI-CAT.
</documentation>
</annotation>
</element>
<element name="maintenanceLocation" type="basic:LocationCode" minOccurs="0">
<annotation>
<documentation>
The location of the HR department which maintains the person, taken from HR-MDS.
</documentation>
</annotation>
</element>
<element name="building" type="basic:String255" minOccurs="0">
<annotation>
<documentation>
Building free-from data
</documentation>
</annotation>
</element>
<element name="room" type="basic:String255" minOccurs="0">
<annotation>
<documentation>
Room (Section, floor and room number)
</documentation>
</annotation>
</element>
<element name="externalCompany" type="basic:String255" minOccurs="0">
<annotation>
<documentation>
For Externals: Name of the external company.
</documentation>
</annotation>
</element>
<element name="externalCompanyLocation" type="basic:LocationCode" minOccurs="0">
<annotation>
<documentation>
For Externals: The location of the external company.
</documentation>
</annotation>
</element>
<element name="personnelActionType" type="basic:PersonnelActionTypeCode" minOccurs="0">
<annotation>
<documentation>
Defines the action type used in SAP HR systems,e.g. Hiring (entry);
Organizational reasignment; Transfer; Change in pay;
early retirement / retirement; leaving; Re-entry into company
</documentation>
</annotation>
</element>
<element name="statusOfContract" type="basic:ContractStatus">
<annotation>
<documentation>
Status of current occupation, e.g. active; inactive; resigned; retired
</documentation>
</annotation>
</element>
<element name="xyzGroupAssociate" type="basic:AssociateCode">
<annotation>
<documentation>
Indicates whether person is xyz Group associate or external
according to respective regulations : external; internal
</documentation>
</annotation>
</element>
<element name="externalRelationToxyz" type="basic:ExternalRelationType"
minOccurs="0" maxOccurs="unbounded">
<annotation>
<documentation>
Describes for persons of type xyzGroupAssociate = external the
relationship to xyz, e.g. customer, subsidiary, ...
Persons can be in more than one relation to xyz.
</documentation>
</annotation>
</element>
<element name="phone" type="basic:String255" minOccurs="0">
<annotation>
<documentation>
Phone Number
</documentation>
</annotation>
</element>
<element name="otherPhone" type="basic:String255" minOccurs="0">
<annotation>
<documentation>
"Business 2/Other Telephone" ist ein multivalue field which can be
filled with additional phone numbers (canonical format).
</documentation>
</annotation>
</element>
<element name="mobile" type="basic:String255" minOccurs="0">
<annotation>
<documentation>
Mobile Phone Number
</documentation>
</annotation>
</element>
<element name="paperFax" type="basic:String255" minOccurs="0" />
<element name="electronicFax" type="basic:String255" minOccurs="0" />
<element name="ipPhone" type="basic:String255" minOccurs="0">
<annotation>
<documentation>IP Phone Number</documentation>
</annotation>
</element>
<element name="lastModified" type="dateTime">
<annotation>
<documentation>
last Time person was modified in CI-CAT
</documentation>
</annotation>
</element>
<element name="lastModifyingUser" type="basic:String255">
<annotation>
<documentation>
Last person, who modified person in CI-CAT. Can be a CI-CAT system
user, e.g. user to connect CI-CAT to WOM.
</documentation>
</annotation>
</element>
<element name="assistant" type="basic:GlobalID" minOccurs="0">
<annotation>
<documentation>
Assistant of person. Reference to assistant vie
globalId
</documentation>
</annotation>
</element>
<element name="activeDirectoryAccount" type="tns:ADAccount"
maxOccurs="unbounded" minOccurs="0">
<annotation>
<documentation>
List of Active Directory accounts of the user.
To indicate that a user is deleted, the list of
AD accounts is empty.
</documentation>
</annotation>
</element>
</sequence>
<attribute name="action" type="basic:ActionType" use="required"/>
</complexType>
<element name="person" type="tns:Person"/>
</schema>
DBMS_XMLSCHEMA.REGISTERSCHEMA (schemaurl => 'PersonTypes.xsd',
schemadoc => lc_person_xsd);
DBMS_OUTPUT.PUT_LINE('PersonTypes.xsd registration successfully completed');
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('PersonTypes.xsd registration failed '||SQLERRM);
END; -
Defining entities with XML schema
Hi,
I came across a problem with XML schema's apparent lack of support for entities. e.g. we define an entity like this:
<!ENTITY le "≤" >.
First off I was trying in my XML instance to include an external entity file like this:
<!DOCTYPE wpi [
<!ENTITY % DerwentXmlEntities PUBLIC "-//Derwent//Derwent XML General ENTITIES 20000214//EN"
"derwent-xml-entities.ent">
%DerwentXmlEntities;
]>
<WPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.derwent.co.uk/wpi.xsd">
but I am not clear on where I should place the file derwent-xml-entities.ent. Everything I tried ended up with:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00202: could not open file "derwent-xml-entities.ent"
Is it possible to include a file like this?
So I tried just defining an entity like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE wpi [
<!ENTITY times "×">
<!ENTITY le "≤">
]>
The "times" seems OK, but for "le" I get:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00217: invalid character 8804 (\u2264)
What sort of encoding should I use?
Thanks
Pete<xsd:element name="PsL">
<xsd:annotation>
<xsd:documentation>
**Pseudo List, required as in D-types, the editors often used the
{H control sequence to force an indent to make lists of compounds more
legible. We can't be sure that they are always lists but there is
useful mark-up there that we wouldn't want to lose**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="PsE" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PsE">
<xsd:annotation>
<xsd:documentation>
Pseudo List Entry
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="PsP" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="PsS" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PsP">
<xsd:annotation>
<xsd:documentation>
Pseudo List Prefix
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="PsP" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="PsS">
<xsd:annotation>
<xsd:documentation>
Pseudo List Suffix
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="PsS" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="Prt">
<xsd:annotation>
<xsd:documentation>
************************ Part Container Element **************
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="PrtNo" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="PrtNm" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PrtNo">
<xsd:annotation>
<xsd:documentation>
PartNo
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="PrtNo" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
xsd:element name="PrtNm">
<xsd:annotation>
<xsd:documentation>
PartName
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="PrtNm" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="L">
<xsd:annotation>
<xsd:documentation>
************************ List Container Element *************
Attribute typ=used by the composition software to decide how to prefix
the list entries, e.g. (a), (A), (i), (1), etc.
AL for AlphaLower
AU for AlphaUpper
RL for RomanLower
RU for RomanUpper
No for Number
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="LP" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="LS" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="typ" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="AL"/>
<xsd:enumeration value="AU"/>
<xsd:enumeration value="RL"/>
<xsd:enumeration value="RU"/>
<xsd:enumeration value="No"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="LP">
<xsd:annotation>
<xsd:documentation>
List Paragraph
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="LP" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="RefD" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="RefF" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="LS">
<xsd:annotation>
<xsd:documentation>
1st level sublist
Attribute typ=used by the composition software to decide how to prefix
the list entries, e.g. (a), (A), (i), (1), etc.
AL for AlphaLower
AU for AlphaUpper
RL for RomanLower
RU for RomanUpper
No for Number
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="LP" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="LSS" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="typ" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="AL"/>
<xsd:enumeration value="AU"/>
<xsd:enumeration value="RL"/>
<xsd:enumeration value="RU"/>
<xsd:enumeration value="No"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="LSS">
<xsd:annotation>
<xsd:documentation>
2nd level list
Attribute typ=used by the composition software to decide how to prefix
the list entries, e.g. (a), (A), (i), (1), etc.
AL for AlphaLower
AU for AlphaUpper
RL for RomanLower
RU for RomanUpper
No for Number
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="LP" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="typ" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="AL"/>
<xsd:enumeration value="AU"/>
<xsd:enumeration value="RL"/>
<xsd:enumeration value="RU"/>
<xsd:enumeration value="No"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="IndexingCorePt">
<xsd:annotation>
<xsd:documentation>
******** ROOT ELEMENT for Core Patent Indexing *********
** Indexing is composed of Derwent Classification (DC),IPCs,
Fragmentation Coding (Frags), Polymer Indexing, Unlinked Registry numbers
and Keyword Indexing (KI).
Any combination is these three elements is allowed.
Attribute vs =Version number starting at 0
Attribute co =Patent country
Attribute se =Patent serial
Attribute ki =Patent Kind
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="DC" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="IPCs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="Frag" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="Polymer" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="IdxU" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="KI" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="vs" type ="xsd:NMTOKEN" use="optional"/>
<xsd:attribute name="co" type ="xsd:NMTOKEN" use="required"/>
<xsd:attribute name="se" type ="xsd:NMTOKEN" use="required"/>
<xsd:attribute name="ki" type ="xsd:NMTOKEN" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="DC">
<xsd:annotation>
<xsd:documentation>
************* DERWENT CLASSIFICATION *******************
** Derwent Classification is divided in 3 main areas:
Chemical(CPI),General & Mechanical (EngPI),
Electronic & Electronical (EPI)
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="CPIs" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="EngPIs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="EPIs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="EngPIs" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="EPIs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:element ref="EPIs" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="CPIs">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT DC
** Container element for CPI**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="CPI" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CPI">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT CPIs
** CPI is composed of sections A to N (no section I)
Any combination is allowed, there has to be at least one section.
No section can appear twice. The DTD does not enforce this.
Section N can't be on his own. The DTD does not enforce this.
Each single Chemical section is composed of one main class (DCCM)
and zero to many secondary classes (DCCSs). One to many Manual
code (MCCs) has to be applied to a given chemical section.
Attribute section= an allowed Derwent CPI section **
Note that content MCCs is optional as its optional in the backfile
before 19??
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="DCCM" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="DCCSs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="MCCs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:element ref="MCCs" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
<xsd:attribute name="sct" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A"/>
<xsd:enumeration value="B"/>
<xsd:enumeration value="C"/>
<xsd:enumeration value="D"/>
<xsd:enumeration value="E"/>
<xsd:enumeration value="F"/>
<xsd:enumeration value="G"/>
<xsd:enumeration value="H"/>
<xsd:enumeration value="J"/>
<xsd:enumeration value="K"/>
<xsd:enumeration value="L"/>
<xsd:enumeration value="M"/>
<xsd:enumeration value="N"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCCM" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** Derwent Class Chemical Main element **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="DCCSs">
<xsd:annotation>
<xsd:documentation>
** Derwent Classes Chemical Secondary Container element**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="DCCS" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCCS" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** A Derwent Class Chemical Secondary (DCCS) **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="MCCs">
<xsd:annotation>
<xsd:documentation>
** Manual Codes CPI Container Element **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="MCC" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="MCC" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** A Manual Code CPI **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="EngPIs">
<xsd:annotation>
<xsd:documentation>
**General & Mechanical Sections Container element**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="EngPI" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="EngPI">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT EngPIs
** General & Mechanical Sections EngPI is composed of sections
P and Q. Any combination is allowed, with at least one section.
There are no manual codes for these sections.
Each single EngPI section is composed of
one or more Derwent Class Engineering (DCEng) elements.
No section can appear twice. The DTD does not enforce this.
Attribute section= an allowed Derwent EngPI section **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="DCEngs" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="sct" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="P"/>
<xsd:enumeration value="Q"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCEngs">
<xsd:annotation>
<xsd:documentation>
** Derwent Class Engineering Container eement **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="DCEng" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCEng" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** Derwent Class Engineering **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="EPIs">
<xsd:annotation>
<xsd:documentation>
** Electronic & Electrical Sections EPI **
Container element for EPI
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="EPI" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="EPI">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT EPIs
** EPI is composed of sections R to X. Any combination is allowed,
with at least one section.
Section R can't be on his own. The DTD does not enforce this.
Each single is composed of one or more Derwent Class Electronic
and Electrical (DCE) elements.
No section can appear twice. The DTD does not enforce this. **
Attribute sct = an allowed Derwent EPI section
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="EPIgp" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="sct" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="R"/>
<xsd:enumeration value="S"/>
<xsd:enumeration value="T"/>
<xsd:enumeration value="U"/>
<xsd:enumeration value="V"/>
<xsd:enumeration value="W"/>
<xsd:enumeration value="X"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="EPIgp">
<xsd:annotation>
<xsd:documentation>
** A Container element to group the related DCE & MCEs elements **
Note that content MCEs is optional as its optional in the backfile
before 19??
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="DCE" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="MCEs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCE" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** Derwent Class Electronic & Electrical (DCE) contains
Manual Codes Electronic & Electrical (MCE) **
** Derwent Class EPI **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="MCEs">
<xsd:annotation>
<xsd:documentation>
** Manual Codes EPI container element **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="MCE" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="MCE" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** A Manual Code EPI **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="IPCs">
<xsd:annotation>
<xsd:documentation>
********************IPCs Container element *************
** The following xlink construct is a link to the IPC codes on
the WIPO site, this could be added to the DTD to provide the link
without adding any thing to the individual instances
xlink:type (locator) #FIXED "locator"
xlink:rl NMTOKEN #FIXED "IPCs"
xlink:href CDATA #FIXED "http://classifications.wipo.int/fulltext/new_ipc/"
xlink:title CDATA #FIXED "IPC Codes" **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="IPC" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="IPC">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT IPCs
** An IPC Code **
** Attribute rnk= Derwent assigned character to indicate type
of IPC:
A= Main IPC
B= Other, unlinked IPCs
C to Y = Linked IPCs and Index Terms
Z= IPC Index Terms
-= Additional terms **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="rnk" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A"/>
<xsd:enumeration value="B"/>
<xsd:enumeration value="C"/>
<xsd:enumeration value="D"/>
<xsd:enumeration value="E"/>
<xsd:enumeration value="F"/>
<xsd:enumeration value="G"/>
<xsd:enumeration value="H"/>
<xsd:enumeration value="I"/>
<xsd:enumeration value="J"/>
<xsd:enumeration value="K"/>
<xsd:enumeration value="L"/>
<xsd:enumeration value="M"/>
<xsd:enumeration value="N"/>
<xsd:enumeration value="O"/>
<xsd:enumeration value="P"/>
<xsd:enumeration value="Q"/>
<xsd:enumeration value="R"/>
<xsd:enumeration value="S"/>
<xsd:enumeration value="T"/>
<xsd:enumeration value="U"/>
<xsd:enumeration value="V"/>
<xsd:enumeration value="W"/>
<xsd:enumeration value="X"/>
<xsd:enumeration value="Y"/>
<xsd:enumeration value="Z"/>
<xsd:enumeration value="-"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="Frag">
<xsd:annotation>
<xsd:documentation>
***************BCE INDEXING OR FRAGMENTATION ************
** Fragmentation Container element**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="FragSub" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="FragSub">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT Frag
** Fragmentation Sub heading **
** Attribute sjct=The main BCE chemical subject categories
defined by Derwent as subsets. The subsets are designated by the
subheadings MO through M6:
MO Agricultural, pharmaceutical 1963-1969
M1 Agricultural, pharmaceutical natural products
and polymers 1970 to present
M2 Agricultural, pharmaceutical 1970 to present
M3 General chemicals 1970 to present
M4 Dyes 1970 to present
M5 Steroids 1963 to present
M6 Galenicals 1976 to present"**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="CardRec" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="sjct" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="M0"/>
<xsd:enumeration value="M1"/>
<xsd:enumeration value="M2"/>
<xsd:enumeration value="M3"/>
<xsd:enumeration value="M4"/>
<xsd:enumeration value="M5"/>
<xsd:enumeration value="M6"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="CardRec">
<xsd:annotation>
<xsd:documentation>
** Card Record **
Attribute no =Derwent assigned record number
Attribute mc = Markush DARC Control Code
Attribute trc = Fragmentaion Control Time ranging codes:
M900 Pre-1970
M901 1970-1971
M902 1972-1981 (8126)
M903 1981 (8127) onward
M905
Attribute rn = 910 Codes generated from registry numbers.
Only searchable from 1981
Attribute wd = 911 Wide Disclosure. Only searchable from 1981
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="FCodes" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="RINs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="SCNs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="MCNs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="DRNs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="DCRs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
-
Validating with multiple schemas
I am setting the schama attribute as follow:
String schemaSource = "C:\\Documents and Settings\\ayache\\My Documents\\C5 XML\\schema\\searhRequest.xsd";
String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
builderFactory.setAttribute(JAXP_SCHEMA_SOURCE, new File(schemaSource));searchRequest.xsd contains include statement: it referes to another schema. When i try to validate the xml document using the scheam above error is thrown stating that the elements that are defined in the second schema(BookingProfile.xsd) are not recognised or can't be resolved.
Is there a way to set multiple schemas?
Your help is much appreciated.I figured out my problem in case anyone else is having trouble..
In the xml document that you need to refer to:
xmlns:xsd="http://www.w3.org/2000/10/XMLSchema-instance that is the namespace
supported by xerces 1.3.1.
Whew!
"Karen Schaper" <[email protected]> wrote:
>
Has anyone been successful at validating xml with a Schema running weblogic
6.1
sp2?
Here is a snippet of code...
SAXParserFactory objFactory = SAXParserFactory.newInstance();
objFactory.setValidating("true");
objFactory.setNamespaceAware("true");
objFactory.setFeature("http://apache.org/xml/features/validation/schema",
"true");
objXMLInputParser.parse(new InputSource(new StringReader(XMLDocument)),
A_HANDLER);
When my xml code runs through the parser I get an error for each element
saying
the element type is not declared in the dtd or schema.
Since weblogic 6.1 runs with 1.3.1 Xerces parser. Does it support xml
validation
with a Schema. From what I've read it seems that it does.
Any help or insight would be appreciated.
Thanks
Karen -
Has anyone been successful at validating xml with a Schema running weblogic 6.1
sp2?
Here is a snippet of code...
SAXParserFactory objFactory = SAXParserFactory.newInstance();
objFactory.setValidating("true");
objFactory.setNamespaceAware("true");
objFactory.setFeature("http://apache.org/xml/features/validation/schema", "true");
objXMLInputParser.parse(new InputSource(new StringReader(XMLDocument)), A_HANDLER);
When my xml code runs through the parser I get an error for each element saying
the element type is not declared in the dtd or schema.
Since weblogic 6.1 runs with 1.3.1 Xerces parser. Does it support xml validation
with a Schema. From what I've read it seems that it does.
Any help or insight would be appreciated.
Thanks
KarenI figured out my problem in case anyone else is having trouble..
In the xml document that you need to refer to:
xmlns:xsd="http://www.w3.org/2000/10/XMLSchema-instance that is the namespace
supported by xerces 1.3.1.
Whew!
"Karen Schaper" <[email protected]> wrote:
>
Has anyone been successful at validating xml with a Schema running weblogic
6.1
sp2?
Here is a snippet of code...
SAXParserFactory objFactory = SAXParserFactory.newInstance();
objFactory.setValidating("true");
objFactory.setNamespaceAware("true");
objFactory.setFeature("http://apache.org/xml/features/validation/schema",
"true");
objXMLInputParser.parse(new InputSource(new StringReader(XMLDocument)),
A_HANDLER);
When my xml code runs through the parser I get an error for each element
saying
the element type is not declared in the dtd or schema.
Since weblogic 6.1 runs with 1.3.1 Xerces parser. Does it support xml
validation
with a Schema. From what I've read it seems that it does.
Any help or insight would be appreciated.
Thanks
Karen
Maybe you are looking for
-
Ideas for a conky weather script ...
Here are the 2 best sources for weather updates for me : http://www.google.ca/search?sourceid=ch - chicoutimi (google) or http://www.meteomedia.com/weather/CAQC0107 (most known weather website/tv-channel of my country) What would be the best grep ou
-
Itunes sync music to ipod but music not visible in ipod once disconnected
Hi, my ipod nano refuses to show any songs I've synchronized. it all started last week, I connected the nano to charge the battery and change my music selection. Itunes (v 8.1 (50)) told me something like it had to erase the ipod for some reasons. I
-
Why can't my daughter edit kadak playsport videos in imovie
I purchased an iPad 2 for my daughter along with the camera connect kit and was told on two occasions in the apple store that she would be able to edit the video from her kodak playsport on it! This is not the case the video is imported but cannot be
-
Populate one Autocomplete box on selection of another in DataGrid
I have 2 Auto complete box inside Editable DataGrid. first for 'Type' second for 'Subtype'. I need to populate the corresponding subtypes on the selection of Type in any row of DataGrid. If I have 2 subtypes with same name in 2 different types then
-
Google map widget markup did not show up?
Hi guys, I am using Zizzer Zazzer version for Google map widget. When I click the checkmark on for "Show Marker". The marker pin did not show up on the map, I even tested with regular Google Map - it did show the markup pin. Do you know how to fix th