Parse rdf with DOMparser

Since rdf is an xml language I thought it was possible to retreive elements from an rdf file via DOM. It does not seem to work though.
Does anybody know this for a fact?
This is part of my Javacode:
DOMParser parser;
XMLDocument rdf;
parser = new DOMParser();
parser.setPreserveWhitespace(true);
try
URL rdfURL = new URL("http://knuff.it.volvo.se/~xml/xmlxjobb/Avdelningtest.xml");
parser.parse(rdfURL);
rdf = parser.getDocument();
NodeList myNodeList = rdf.getElementsByTagName("vitinf:departmentNumber");
int i = myNodeList.getLength();
for (int a = 1; a <= i; a++)
Node myNode = myNodeList.item(a-1);
System.out.println("");
System.out.println("Lets show the nodename");
System.out.println(myNode.getNodeName());
System.out.println("Lets show the departmentnumber");
System.out.println(myNode.getFirstChild().getNodeValue());
When doing the same thing but replacing the URL with one to a "normal" xml-file without namespaces and removing the vitinf-namespace tag in front of departmentNumber,it works perfectly well.
Thanks
//Camilla

sorry i should have been more specific. yeah i know all about xml parsers and my idea was just to read in the text file using java and if the string location is read in for example then just to output the rdf tag location in the rdf file. ive done this before but complications arose when validating it etc, just thought there might be a library like Jena to do it properly for me.

Similar Messages

  • SAX Parser Validation with Schemas (C, C++ and JAVA)

    We are currently using the Oracle XML Parser for C to parse and validate XML data using the SAX parser interface with validation turned on. We currently define our XML with a DTD, but would like to switch to schemas. However, the Oracle XML Parser 9.2.0.3.0 (C) only validates against a DTD, not a schema when using the SAX interface. Are there plans to add schema validation as an option? If so, when would this be available? Also, the same limitation appears to be true for C++ and JAVA. When will any of these provide SAX parsing with schema validation?
    Thanks!
    John

    Will get back to you after checked with development team...

  • Problem parsing XML with schema when extracted from a jar file

    I am having a problem parsing XML with a schema, both of which are extracted from a jar file. I am using using ZipFile to get InputStream objects for the appropriate ZipEntry objects in the jar file. My XML is encrypted so I decrypt it to a temporary file. I am then attempting to parse the temporary file with the schema using DocumentBuilder.parse.
    I get the following exception:
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element '<root element name>'
    This was all working OK before I jarred everything (i.e. when I was using standalone files, rather than InputStreams retrieved from a jar).
    I have output the retrieved XML to a file and compared it with my original source and they are identical.
    I am baffled because the nature of the exception suggests that the schema has been read and parsed correctly but the XML file is not parsing against the schema.
    Any suggestions?
    The code is as follows:
      public void open(File input) throws IOException, CSLXMLException {
        InputStream schema = ZipFileHandler.getResourceAsStream("<jar file name>", "<schema resource name>");
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = null;
        try {
          factory.setNamespaceAware(true);
          factory.setValidating(true);
          factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          factory.setAttribute(JAXP_SCHEMA_SOURCE, schema);
          builder = factory.newDocumentBuilder();
          builder.setErrorHandler(new CSLXMLParseHandler());
        } catch (Exception builderException) {
          throw new CSLXMLException("Error setting up SAX: " + builderException.toString());
        Document document = null;
        try {
          document = builder.parse(input);
        } catch (SAXException parseException) {
          throw new CSLXMLException(parseException.toString());
        }

    I was originally using getSystemResource, which worked fine until I jarred the application. The problem appears to be that resources returned from a jar file cannot be used in the same way as resources returned directly from the file system. You have to use the ZipFile class (or its JarFile subclass) to locate the ZipEntry in the jar file and then use ZipFile.getInputStream(ZipEntry) to convert this to an InputStream. I have seen example code where an InputStream is used for the JAXP_SCHEMA_SOURCE attribute but, for some reason, this did not work with the InputStream returned by ZipFile.getInputStream. Like you, I have also seen examples that use a URL but they appear to be URL's that point to a file not URL's that point to an entry in a jar file.
    Maybe there is another way around this but writing to a file works and I set use File.deleteOnExit() to ensure things are tidied afterwards.

  • Has anyone had a opf parse error with container.xml missing, when it is actually present plz ?

    Has anyone had a opf parse error with container.xml missing, when it is actually present plz ?

    Has anyone had a opf parse error with container.xml missing, when it is actually present plz ?

  • Do you know how to call RDF with java code?

    Say me a tip!
    Environment:
    Linux, Reports 6i,java beans, jsp
    My mission is to run a report with java code.
    But I don't know how to.
    Basic flow is :
    On web browser, call jsp a program and
    that jsp call a java module,
    and the java module call a reports RDF with parameters
    I don't need reponse message from rwcgi60 or rwrun60.

    hello,
    the easiest way is to use the regular HTTP request to either the servlet or the CGI to run a report request from within a java-class.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                       

  • XML parser clashes with WL 5.1

    Hello,
    I see that this question has been asked before but I've seen no answer so
    far. We have code that requires an XML parser. We currently us
    jaxp/xerces/xalan. The version we use is more recent than the one
    included in WL5.1.9. Because of this, we are getting NoClassDefFound
    exceptions when deploying our apps. Or sometimes we get "No such method"
    exceptions. Is there a way, short of getting the sources to all our
    packages and changing the package name, to have more recent XMP parser
    coexist with those of WL?
    If not, what are the versions of the third-party jars bundled with WL
    5.1.9? Is that information documented somewhere? We may also try to
    back-port our code so it confirms to whatever version is included in WL.
    Thanks,
    L
    Laurent Duperval <mailto:[email protected]>
    La situation se cornélise à vue d'oeil!
    -Alambic Talon

    I have seen and dealt with this before.
    I had three versions of Xerces in my classpath. I find that I have to put
    the newest jar file in the front of the classpath. I had Xalan.jar and
    Xerces.jar followed by XML4J followed at the end by weblogicaux.jar and my
    application worked well. You can also make use of the WEB-INF/lib directory
    of your application though I didn't get down to that details and solved my
    methodNotFound problem by modifing the main Classpath.
    Hope that helps.
    IH
    "Laurent Duperval" <[email protected]> wrote in message
    news:3b1e30b6$[email protected]..
    Hello,
    I see that this question has been asked before but I've seen no answer so
    far. We have code that requires an XML parser. We currently us
    jaxp/xerces/xalan. The version we use is more recent than the one
    included in WL5.1.9. Because of this, we are getting NoClassDefFound
    exceptions when deploying our apps. Or sometimes we get "No such method"
    exceptions. Is there a way, short of getting the sources to all our
    packages and changing the package name, to have more recent XMP parser
    coexist with those of WL?
    If not, what are the versions of the third-party jars bundled with WL
    5.1.9? Is that information documented somewhere? We may also try to
    back-port our code so it confirms to whatever version is included in WL.
    Thanks,
    L
    Laurent Duperval <mailto:[email protected]>
    La situation se cornélise à vue d'oeil!
    -Alambic Talon

  • Exception when  XML InputStream is parsed with DOMParser

    iam trying to parse the xml inputstream two times.
    second time i used reset() method to reset the inputstream but
    its throwing exception.
    "java.io.IOException: mark/reset not supported
         at java.io.InputStream.reset(InputStream.java:329)"
    i need to solve it as early as possible...
    thanks in advance...
    dando

    Sorry, I forgot to mention this, from the InputStream javadoc on reset()
    "The method reset for class InputStream does nothing and always throws an IOException"
    This means that if you need to reset your stream, it's best that you use one of these:
    Direct Known Subclasses:
    AudioInputStream, ByteArrayInputStream, FileInputStream, FilterInputStream, InputStream (CORBA), ObjectInputStream, PipedInputStream, SequenceInputStream, StringBufferInputStream
    or some other subclass.
    -G

  • Report rdf with size 8mb taking more time to open

    Hello All,
    I have a rdf ( reports 6i) report with size 8.5mb taking more time to open and more time to access each field.
    Please let me know how do i solve this issue.
    Please do the needful.
    Thanks.

    Thanks for immediate response.
    pls let me know how do i know this.
    Right now i have the below details from report->help
    Report Builder 6.0.8.11.3
    ORACLE Server Release 8.0.6.0.0
    Oracle Procedure Builder 6.0.8.11.0
    Oracle ORACLE PL/SQL V8.0.6.0.0 - Production
    Oracle CORE Version 4.0.6.0.0 - Production
    Oracle Tools Integration Services 6.0.8.10.2
    Oracle Tools Common Area 6.0.5.32.1
    Oracle Toolkit 2 for Windows 32-bit platforms 6.0.5.35.0
    Resource Object Store 6.0.5.0.1
    Oracle Help 6.0.5.35.0
    Oracle Sqlmgr 6.0.8.11.3
    Oracle Query Builder 6.0.7.0.0 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle ZRC 6.0.8.11.3
    Oracle Express 6.0.8.3.5
    Oracle XML Parser     1.0.2.1.0     Production
    Oracle Virtual Graphics System 6.0.5.35.0
    Oracle Image 6.0.5.34.0
    Oracle Multimedia Widget 6.0.5.34.0
    Oracle Tools GUI Utilities 6.0.5.35.0
    Thanks
    Edited by: Abdul Khan on Jan 26, 2010 11:54 PM

  • Parsing DOM with XSL and output as HTML

    In a servlet I am fetching data from DB into an DOM-tree (using ordinary JDBC and building the XML-DOM while fetching rows). This is done in a servlet, and before I response to the browser i use Oracle XML-parser to join my DOM-tree with an XSL-file. If I try to my DOM-tree out before parsing, it contains data. But the parsed DOM only contains XSL-tags, no data. What do I do wrong?
    Here is the code:
    DOMParser parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    //No problem finding the XSL-file...
    URL xslURL = createURL("employee.xsl");
    parser.parse(xslURL);
    xslDoc = parser.getDocument();
    XSLStylesheet xsl = new XSLStylesheet(xslDoc, xslURL);
    XSLProcessor processor = new XSLProcessor();
    processor.showWarnings(true);
    processor.setErrorStream(System.out);
    //XML doc does contain data!!!
    DocumentFragment result =
    processor.processXSL(xsl, xmlDoc);
    xmlOut = new XMLDocument();
    Element root = xmlOut.createElement("root");
    xmlOut.appendChild(root);
    root.appendChild(result);
    xmlOut.print(out); // Result is only the XSL-file.....
    Regards Frank =:>

    Sorry, but I still can not make it work. Here are the XSL and XML-files. My XML test file (which reflects the DOM I am makings
    is:
    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE employees SYSTEM "employee.dtd">
    <?xml:stylesheet type="text/xsl" href="employee.xsl" ?>
    <employees>
    <employee>
    <id>1</id>
    <firstname>Frank</firstname>
    <lastname>Nilsen</lastname>
    </employee>
    <employee>
    <id>2</id>
    <firstname>Ronald</firstname>
    <lastname>Reagen</lastname>
    </employee>
    </employees>
    XSL-file is:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
    <xsl:template match="/">
    <HTML>
    <BODY>
    <xsl:for-each select="employees/employee">
    <font color="red"><xsl:value-of select="id"/></font>
    <xsl:value-of select="firstname"/>
    <xsl:value-of select="lastname"/>
    </xsl:for-each>
    </BODY>
    </HTML>
    </xsl:template>
    </xsl:stylesheet>
    Regards,
    Frank =:>

  • Parsing rdf documents

    I'm attempting to parse an rdf document, but I can't navigate
    the returned xml tree because the first tag is called rdf:RDF so I
    can't start with just rdf and rdf:RDF as a variable name breaks
    coldfusion.
    I can in using xmlSearch, but I'd like to easily be able to
    parse both rss and rdf

    Parsing a HTML document is a huge task, you shouldn't do it yourself but instead javax.text.html and javax.text.html.parser already provide almost everything you ever need

  • Help with DOMParser

    Hi
    I'm using the DOMParse to parse a XML File.
    I want to print the tagnames.My program does it, but it prints a lot of "#text" too. What are they? How can I avoid them?
    Do I have to use a dtd or a xsd to use correctly the DOMParser? if I have, how can I define them?
    Thank you

    You cannot avoid the "#text" entries without losing the content of your XML.
    When you have
    <a>
    <b/>
    </a>
    You get two #text entries for free! Each has a newline. You can avoid this
    by using
    <a><b/></a>
    Or, if you have:
    <data>
    <name>Sam Smith</name>
    <city>New Town</city>
    </data>
    In this case, you get text nodes with the newlines and you also get a tex node with "Sam Smith" and another with "New Town".
    I think the better course of action is to understand what you have and then accept the fact that it is the way that DOM works.
    Dave Patterson

  • Does the parser work with large XML files?

    Is there a restriction on the XML file size that can be loaded into the parser?
    I am getting a out of memory exception reading in large XML file(10MB) using the commands
    DOMParser parser = new DOMParser();
    URL url = createURL(argv[0]);
    parser.setErrorStream(System.err);
    parser.setValidationMode(true);
    parser.showWarnings(true);
    parser.parse(url);
    Win NT 4.0 Server
    Sun JDK 1.2.2
    ===================================
    Error output
    ===================================
    Exception in thread "main" java.lang.OutOfMemoryError
    at oracle.xml.parser.v2.ElementDecl.getAttrDecls(ElementDecl.java, Compi
    led Code)
    at java.util.Hashtable.<init>(Unknown Source)
    at oracle.xml.parser.v2.DTDDecl.<init>(DTDDecl.java, Compiled Code)
    at oracle.xml.parser.v2.ElementDecl.getAttrDecls(ElementDecl.java, Compi
    led Code)
    at oracle.xml.parser.v2.ValidatingParser.checkDefaultAttributes(Validati
    ngParser.java, Compiled Code)
    at oracle.xml.parser.v2.NonValidatingParser.parseAttributes(NonValidatin
    gParser.java, Compiled Code)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingPa
    rser.java, Compiled Code)
    at oracle.xml.parser.v2.ValidatingParser.parseRootElement(ValidatingPars
    er.java:97)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingP
    arser.java:199)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:146)
    at TestLF.main(TestLF.java:40)
    null

    We have a number of test files that are that size and it works without a problem. However using the DOMParser does require significantly more memory than your doc size.
    What is the memory configuration of the JVM that you are running with? Have you tried increasing it? Are you using our latest version 2.0.2.6?
    Oracle XML Team

  • InfoPath 2010 form parsing error with 3600 execution timeout value in SharePoint 2010

    Hi,
    I have a list in SharePoint 2010 with 100 columns where 25 of them are calculated columns. This list is designed by InfoPath 2010 with two secondary data connections to pull a few data from another two lists. There are 25 set value rules with the submit
    button in InfoPath from. At present, the list is containing around 1000 items.
    The problem is, when I published the InfoPath form it throws an error:
    The SOAP message cannot be parsed.
    In fact, the execution timeout is set to 3600 in config file. When I delete items from the list and keep it around 700 the InfoPath form publish then.
    Could somebody tell me why this problem and what is the possible solution.
    Thanks in advance.

    Hi pointtoshare,
    According to your description, my understanding is that you got an error when you published InfoPath form.
    Please modify the web.config file like :
    <location path="_layouts/UploadEx.aspx">
         <system.web>
           <httpRuntime maxRequestLength="51200" executionTimeout="300" />
         </system.web>
       </location>
    And modify the <securityPolicy> section like :
    The web.config file is in C:\inetpub\wwwroot\wss\VirtualDirectories\spwebappname.
    There is another reason for this issue, please take a look at :
    http://www.heyweb.net/2011/07/infopath-the-soap-message-cannot-be-parsed/
    Here are some similar posts for you to take a look at:
    http://social.technet.microsoft.com/Forums/en-US/ea8da113-fe9a-4878-9994-c1f24cc85c37/soap-error-when-publishing-infopath-form-to-sharepoint?forum=sharepointcustomizationprevious
    http://sharepointshah.blogspot.in/2012/11/soap-message-cannot-be-parsed-error.html
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Error while parsing JSP with WebLogic 5.1/SP9/JDK 1.2.2

    Hello everybody,
              I get the error given below when calling a JSP in a WebLogic
              application which seems to work fine in all other (non-JSP) parts:
              java.lang.NullPointerException:
                   at weblogic.servlet.jsp.JspLexer.addSetPropertyValue(JspLexer.java:1432)
                   at weblogic.servlet.jsp.JspLexer.mXML_SET_PROPERTY(JspLexer.java,
              Compiled Code)
                   at weblogic.servlet.jsp.JspLexer.mXML_THING(JspLexer.java:1726)
                   at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java, Compiled Code)
                   at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java, Compiled
              Code)
                   at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java, Compiled Code)
                   at weblogic.servlet.jsp.JspParser.doit(JspParser.java, Compiled Code)
                   at weblogic.servlet.jsp.JspParser.parse(JspParser.java:159)
                   at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109)
                   at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java,
              Compiled Code)
                   at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled
              Code)
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:227)
                   at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:200)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:115)
                   at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
                   at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
                   at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
                   at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
                   at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              Code)
              I know that this error has been reported more than once in these
              discussion groups, and all people who solved it say
              - that it occurs only wen running WebLogic 5.1 with JDK 1.3 instead of
              1.2.2
              - that it may also be caused by bad jsp code
              But in my case, it has to be another reason, because
              - I am using jdk 1.2.2
              - the same JSP file is running withour errors on WebLogic 6
              I wonder if it could have something to do with the operating system:
              the parsing error is produced on a Windows version of WL 5.1, while my
              WL 6 which doesn't cause errors is running with Linux.
              Many thanks in advance for any help,
              Eckhard Beisswenger
              

    Once again me!
              After a long time, I stumbled by accident across the answer that solves the problem I described above. It is explained at
              http://support.bea.com/application;JSESSIONID_WLCS_DEFAULT=2R2lzQfEBxFRMX2z0AxeU1Un3N1522I9fCIUI7GfjnjsiSYkPscz
              The clue is that weblogic complains about corresponding get and set methods, when the type of the set methods parameter is different from the return type of the corresponding get method. Unfortunately, the weblogic lexer class gives only a NullPointerException without any hint.
              

  • Exception when parsing schema with XJC

    Using the command "xjc -d C:\Temp -p sbxml C:\Temp\sb2.xsd" in attempt to generate java classes for my schema I get the error below. The schema is well-formed and valid according to XMLSpy. The schema in question is found below the error. Thanks.
    Mark
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
    at com.sun.msv.verifier.identity.IDConstraintChecker.feedAttribute(IDConstraintChecker.java:218)
    at com.sun.msv.verifier.Verifier.startElement(Verifier.java:204)
    at org.iso_relax.verifier.impl.VerifierFilterImpl.startElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
    at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:221)
    at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:874)
    at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:591)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:747)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScanner
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
    at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:151)
    at com.sun.xml.xsom.impl.parser.XSOMParser.parse(XSOMParser.java:116)
    at com.sun.tools.xjc.Driver.loadXMLSchemaGrammar(Driver.java:511)
    at com.sun.tools.xjc.Driver.loadGrammar(Driver.java:404)
    at com.sun.tools.xjc.Driver.run(Driver.java:268)
    at com.sun.tools.xjc.Driver.main(Driver.java:88)
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSPY v5 U (http://www.xmlspy.com) by Mark (CMH) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="INFO_EX">
              <xs:annotation>
                   <xs:documentation>Collection of data for any number of days</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="DAILY_INFO" minOccurs="0" maxOccurs="unbounded">
                             <xs:annotation>
                                  <xs:documentation>Collection of data for all areas for a single day</xs:documentation>
                             </xs:annotation>
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="AREA_INFO" type="AREA_INFO_TYPE" minOccurs="0" maxOccurs="unbounded"/>
                                  </xs:sequence>
                                  <xs:attribute name="DATE_TODAY" type="xs:date" use="required"/>
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="AREA_INFO_TYPE">
              <xs:annotation>
                   <xs:documentation>Collection of data for a single area for a single day</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="FIELD_OBS" type="FIELD_OBS_TYPE" minOccurs="0" maxOccurs="unbounded"/>
                   <xs:element name="AVALANCHE" type="AV_TYPE" minOccurs="0" maxOccurs="unbounded"/>
                   <xs:element name="NOTABLE" type="NOTABLE_TYPE" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
              <xs:attribute name="AREA_ABBREV" type="AREA_ABBREV_TYPE" use="required"/>
         </xs:complexType>
         <xs:complexType name="FIELD_OBS_TYPE">
              <xs:annotation>
                   <xs:documentation>Collection of a day's field observations</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="GEO_ID" type="SB_ID_TYPE"/>
                   <xs:element name="SKY_PM" type="SKY_TYPE"/>
                   <xs:element name="SKY_AM" type="SKY_TYPE"/>
                   <xs:element name="SKI_ELEV_MAX" type="xs:unsignedShort"/>
                   <xs:element name="SKI_ELEV_MIN" type="xs:unsignedShort"/>
                   <xs:element name="SKI_METERS" type="xs:unsignedShort"/>
                   <xs:element name="SKI_QUALITY">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="P"/>
                                  <xs:enumeration value="F"/>
                                  <xs:enumeration value="G"/>
                                  <xs:enumeration value="E"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="HI_TEMP" type="xs:decimal"/>
                   <xs:element name="LO_TEMP" type="xs:decimal"/>
                   <xs:element name="XPORT_AM" type="TRANSPORT_TYPE"/>
                   <xs:element name="XPORT_PM" type="TRANSPORT_TYPE"/>
                   <xs:element name="HN24" type="xs:int"/>
                   <xs:element name="FO_DATE" type="xs:date" minOccurs="0"/>
                   <xs:element name="W_SPD_AM" type="WIND_SPEED_TYPE"/>
                   <xs:element name="W_SPD_PM" type="WIND_SPEED_TYPE"/>
                   <xs:element name="DTMOD" type="xs:dateTime"/>
                   <xs:element name="AV_ACTIVITY" type="xs:string"/>
                   <xs:element name="PRECIP_AM" type="PRECIP_TYPE"/>
                   <xs:element name="PRECIP_PM" type="PRECIP_TYPE"/>
                   <xs:element name="FO_REMARK" type="xs:string"/>
                   <xs:element name="NIL_NEW" type="xs:boolean"/>
                   <xs:element name="PERCENT_OBS" type="xs:unsignedShort"/>
                   <xs:element name="HS" type="xs:integer"/>
                   <xs:element name="W_DIR_AM" type="WIND_DIRECTION_TYPE"/>
                   <xs:element name="W_DIR_PM" type="WIND_DIRECTION_TYPE"/>
                   <xs:element name="SFC2" type="SURFACE_TYPE"/>
                   <xs:element name="SFC1" type="SURFACE_TYPE"/>
                   <xs:element name="XPORT_DIR_AM" type="TRANSPORT_DIRECTION_TYPE"/>
                   <xs:element name="XPORT_DIR_PM" type="TRANSPORT_DIRECTION_TYPE"/>
              </xs:sequence>
              <xs:attribute name="FO_ID" type="SB_ID_TYPE" use="required"/>
         </xs:complexType>
         <xs:complexType name="NOTABLE_TYPE">
              <xs:annotation>
                   <xs:documentation>Data concerning a notable event</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="AV_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="PARTY_SIZE" type="xs:unsignedShort"/>
                   <xs:element name="CAUGHT" type="xs:unsignedShort"/>
                   <xs:element name="PARTLY_BURIED" type="xs:unsignedShort"/>
                   <xs:element name="BURIED" type="xs:unsignedShort"/>
                   <xs:element name="INJURED" type="xs:unsignedShort"/>
                   <xs:element name="FATALITIES" type="xs:unsignedShort"/>
                   <xs:element name="REMARK" type="xs:string"/>
                   <xs:element name="DTMOD" type="xs:dateTime"/>
                   <xs:element name="NTBL_IMG" type="xs:hexBinary" minOccurs="0"/>
                   <xs:element name="NTBL_TIME" type="xs:time"/>
                   <xs:element name="NTBL_DATE" type="xs:date"/>
                   <xs:element name="MAIN_IMGLINK_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="NTBL_GEO_ID" type="SB_ID_TYPE" minOccurs="0"/>
              </xs:sequence>
              <xs:attribute name="NOTABLE_ID" type="SB_ID_TYPE" use="required"/>
         </xs:complexType>
         <xs:complexType name="AV_TYPE">
              <xs:annotation>
                   <xs:documentation>Data concerning a single avalanche</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="LENGTH_MIN" type="xs:unsignedInt"/>
                   <xs:element name="LENGTH_MAX" type="xs:unsignedInt"/>
                   <xs:element name="REMARK" type="xs:string"/>
                   <xs:element name="LWC">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Dry"/>
                                  <xs:enumeration value="Moist"/>
                                  <xs:enumeration value="Wet"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="AV_SIZE">
                        <xs:simpleType>
                             <xs:restriction base="xs:float">
                                  <xs:minInclusive value="1"/>
                                  <xs:maxInclusive value="5"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="SKIABLE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Y"/>
                                  <xs:enumeration value="N"/>
                                  <xs:enumeration value="N-Y"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="GEO_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="THICK_MIN" type="xs:unsignedInt"/>
                   <xs:element name="NUM">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:pattern value="[0-9]*"/>
                                  <xs:pattern value="Sev"/>
                                  <xs:pattern value="Num"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="WIDTH_MIN" type="xs:unsignedInt"/>
                   <xs:element name="WIDTH_MAX" type="xs:unsignedInt"/>
                   <xs:element name="MAIN_IMGLINK_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="THICK_MAX" type="xs:unsignedInt"/>
                   <xs:element name="THICK_MIN" type="xs:unsignedInt"/>
                   <xs:element name="DTMOD" type="xs:dateTime"/>
                   <xs:element name="TYPE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Slab"/>
                                  <xs:enumeration value="Loose"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="AV_DATE" type="xs:date"/>
                   <xs:element name="AV_TIME" type="xs:time"/>
                   <xs:element name="AV_TRIGGER">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="15"/>
                                  <xs:pattern value="N[aci].*|S[acry].*|H[acry].*|X[hcryer].*"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="BEDSFC_FORMANDSIZE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="RG"/>
                                  <xs:enumeration value="DF"/>
                                  <xs:enumeration value="CR"/>
                                  <xs:enumeration value="IM"/>
                                  <xs:enumeration value="WG"/>
                                  <xs:enumeration value="FC"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="AV_LEVEL">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Old"/>
                                  <xs:enumeration value="Storm"/>
                                  <xs:enumeration value="Ground"/>
                                  <xs:enumeration value="Glacier"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="ASPECT">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="N"/>
                                  <xs:enumeration value="NE"/>
                                  <xs:enumeration value="E"/>
                                  <xs:enumeration value="SE"/>
                                  <xs:enumeration value="S"/>
                                  <xs:enumeration value="SW"/>
                                  <xs:enumeration value="W"/>
                                  <xs:enumeration value="NW"/>
                                  <xs:enumeration value="All"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="WKLYR_DATE"/>
                   <xs:element name="TIMERANGE" type="xs:unsignedInt"/>
                   <xs:element name="INCLINE">
                        <xs:simpleType>
                             <xs:restriction base="xs:unsignedInt">
                                  <xs:minInclusive value="0"/>
                                  <xs:maxInclusive value="180"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="ELEV_MIN" type="xs:unsignedInt"/>
                   <xs:element name="ELEV_MAX" type="xs:unsignedInt"/>
                   <xs:element name="AV_CUTBLOCK">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="1"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="LOC_DESCRIPTION">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="30"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="WKLYR_FORMANDSIZE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="PP"/>
                                  <xs:enumeration value="SH"/>
                                  <xs:enumeration value="FC"/>
                                  <xs:enumeration value="DF"/>
                                  <xs:enumeration value="WG"/>
                                  <xs:enumeration value="DH"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="NTBL" type="xs:boolean"/>
              </xs:sequence>
              <xs:attribute name="AV_ID" type="SB_ID_TYPE" use="required"/>
         </xs:complexType>
         <xs:simpleType name="SB_ID_TYPE">
              <xs:annotation>
                   <xs:documentation>Reference type</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:maxLength value="10"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="AREA_ABBREV_TYPE">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="AD"/>
                   <xs:enumeration value="BB"/>
                   <xs:enumeration value="BU"/>
                   <xs:enumeration value="BA"/>
                   <xs:enumeration value="CA"/>
                   <xs:enumeration value="GL"/>
                   <xs:enumeration value="GO"/>
                   <xs:enumeration value="MO"/>
                   <xs:enumeration value="MB"/>
                   <xs:enumeration value="RE"/>
                   <xs:enumeration value="KO"/>
                   <xs:enumeration value="VA"/>
                   <xs:enumeration value="ST"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="SKY_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts choices of sky observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="CLR"/>
                   <xs:enumeration value="OVC"/>
                   <xs:enumeration value="BKN"/>
                   <xs:enumeration value="SCT"/>
                   <xs:enumeration value="X"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="PRECIP_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts choices of precipation observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="NIL"/>
                   <xs:enumeration value="S-1"/>
                   <xs:enumeration value="S1"/>
                   <xs:enumeration value="S2"/>
                   <xs:enumeration value="S3"/>
                   <xs:enumeration value="S4"/>
                   <xs:enumeration value="RV"/>
                   <xs:enumeration value="RL"/>
                   <xs:enumeration value="RH"/>
                   <xs:enumeration value="RS"/>
                   <xs:enumeration value="G"/>
                   <xs:enumeration value="ZR"/>
                   <xs:enumeration value=""/>
                   <xs:enumeration value="RM"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="WIND_SPEED_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts the choices of wind speed observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="C"/>
                   <xs:enumeration value="L"/>
                   <xs:enumeration value="M"/>
                   <xs:enumeration value="S"/>
                   <xs:enumeration value="X"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="TRANSPORT_DIRECTION_TYPE">
              <xs:annotation>
                   <xs:documentation>Enumeration of directions</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="N"/>
                   <xs:enumeration value="NE"/>
                   <xs:enumeration value="E"/>
                   <xs:enumeration value="SE"/>
                   <xs:enumeration value="S"/>
                   <xs:enumeration value="SW"/>
                   <xs:enumeration value="W"/>
                   <xs:enumeration value="NW"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="TRANSPORT_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts the choices of transport observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Nil"/>
                   <xs:enumeration value="Prv"/>
                   <xs:enumeration value="M"/>
                   <xs:enumeration value="I"/>
                   <xs:enumeration value="U"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="SURFACE_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts the choices of the surface descriptions</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="PP"/>
                   <xs:enumeration value="DF"/>
                   <xs:enumeration value="RG"/>
                   <xs:enumeration value="FC"/>
                   <xs:enumeration value="DH"/>
                   <xs:enumeration value="WG"/>
                   <xs:enumeration value="SH"/>
                   <xs:enumeration value="IM"/>
                   <xs:enumeration value="CR"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="WIND_DIRECTION_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts possible observed wind directions</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="N"/>
                   <xs:enumeration value="NE"/>
                   <xs:enumeration value="E"/>
                   <xs:enumeration value="SE"/>
                   <xs:enumeration value="S"/>
                   <xs:enumeration value="SW"/>
                   <xs:enumeration value="W"/>
                   <xs:enumeration value="NW"/>
                   <xs:enumeration value="V"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>

    myhrem, I've just come across exactly the same problem after amemding my schema. Fortunatley I hadn't changed much so it was possible to find out what caused the error. It is the empty enumeration element where value is equal to "" that causes xjc to throw the error.
    I don't know if its right or wrong, in my case I was able to remove the empty element from the xsd.

Maybe you are looking for

  • New Mac Pro Won't Work With Old Studio Display

    Hi, Just got a new Mac Pro Desktop 8-core only to find out my old Apple Studio Display 17" won't work without a $100 adapter. We're thinking of just buying a new monitor instead. My question is will other brands now work direclty with the new Macs -

  • Clarification Request on New Solaris Cert Exam Requirements.

    Regarding: Important Changes to Java, and Oracle Solaris Certifications Beginning August 1, 2011, Java Architect, Java Developer, Solaris System Administrator and Solaris Security Administrator certification path requirements will include a new manda

  • DVD not working but works in Sim

    My project was completed in Final Cut and exported in Compressor. Imported all assets into Studio Pro and after setting all required settings, I burned the DVD. The DVD will play for 28:30 then freezes. The simulator works beautiful with viewing all

  • Getting an error when connecting ipod to laptop

    I have downloaded the latest version of iTunes and then when I plug in the iPod shuffle I get an error message about the version if music software is not compatible with my iPod and to try reinstalling it. Have tried reinstalling the software a few t

  • Problem installing a downloaded add-on.

    I have downloaded mmsAutocorrect into Thunderbird; it appears in Extensions in Addon Manager. I have followed the directions through: tools-add-ons click add-ons type name in search field; press enter (add-on appears in Search). Select desired add-on