Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Elements, Nodes classes, and generics

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Calum MacLean" <cnmaclean AT hotmail.com>
  • To: <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] Elements, Nodes classes, and generics
  • Date: Wed, 4 Jan 2006 16:05:18 -0000

Hi

I've just starting using XOM, and so far it looks excellent.

I want to ask about the custom Nodes and Elements classes, and generics.
I can understand the reasoning behind choosing to use custom classes, given
that pre-Java 5.0 didn't have generics.

Given that Java 5.0 has been out for a while now, are there any plans to
rectify this situation and to use List<Element>, List<Node> etc. instead?

I understand that there's a issue with still supporting pre-Java 5.0 users
(I'm guessing this probably constitutes the majority of users). But are
there any plans to support Java 5.0 users in a more standard way?

Thanks,
Calum
>From forslund AT mail.com Wed Jan 4 11:50:14 2006
Return-Path: <forslund AT mail.com>
X-Original-To: xom-interest AT lists.ibiblio.org
Delivered-To: xom-interest AT lists.ibiblio.org
Received: from smtp102.plus.mail.mud.yahoo.com
(smtp102.plus.mail.mud.yahoo.com [68.142.206.235])
by lists.ibiblio.org (Postfix) with SMTP id 7BDB34C011
for <xom-interest AT lists.ibiblio.org>;
Wed, 4 Jan 2006 11:50:14 -0500 (EST)
Received: (qmail 44630 invoked from network); 4 Jan 2006 16:50:14 -0000
Received: from unknown (HELO ?127.0.0.1?) (dwforslund AT 168.103.126.174 with
plain)
by smtp102.plus.mail.mud.yahoo.com with SMTP; 4 Jan 2006 16:50:13
-0000
Message-ID: <43BBFCC5.1060902 AT mail.com>
Date: Wed, 04 Jan 2006 09:50:13 -0700
From: David Forslund <forslund AT mail.com>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
To: xom-interest AT lists.ibiblio.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Subject: [XOM-interest] XOM 1.1 Parse question
X-BeenThere: xom-interest AT lists.ibiblio.org
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: <xom-interest.lists.ibiblio.org>
List-Unsubscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=unsubscribe>
List-Archive: <https://lists.ibiblio.org/sympa/arc/xom-interest>
List-Post: <mailto:xom-interest AT lists.ibiblio.org>
List-Help: <mailto:sympa AT lists.ibiblio.org?subject=HELP>
List-Subscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Jan 2006 16:50:14 -0000

I'm trying to parse the an XML file with XOM1.1 whose first few lines
are attached below. I get the following error:

getCurrentContainer: codeSystems being initialized
nu.xom.ParsingException: Illegal path character
at nu.xom.Builder.build(Builder.java:1146)
at nu.xom.Builder.build(Builder.java:586)
at org.openemed.CTS.LexGridMgr.readFile(Unknown Source)
at org.openemed.CTS.BrowserImpl.<init>(Unknown Source)
at org.openemed.CTS.TestBrowser.main(Unknown Source)
Caused by: nu.xom.MalformedURIException: Illegal path character
at nu.xom.Verifier.throwMalformedURIException(Verifier.java:161)
at nu.xom.Verifier.checkPath(Verifier.java:416)
at nu.xom.Verifier.checkAbsoluteURIReference(Verifier.java:907)
at nu.xom.Element.addNamespaceDeclaration(Element.java:1164)
at
nu.xom.NonVerifyingHandler.startElement(NonVerifyingHandler.java:103)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(Unknown
Source)
at org.apache.xerces.impl.XMLNamespaceBinder.startElement(Unknown
Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown

Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown

Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at nu.xom.Builder.build(Builder.java:1127)
... 4 more

If I remove the
xmlns:schemaLocation="http://LexGrid.org/schema/2005/01/LexGrid/codingSchemes
http://LexGrid.org/schema/2005/01/LexGrid/codingSchemes.xsd";

namespace declaration it parses correctly.

I believe the file is using the schemaLocation correctly based on:
http://www.w3.org/TR/xmlschema-0/#schemaLocation

Am I understanding this correctly and XOM is wrong or not?

Thanks,

Dave Forslund

-------

<?xml version="1.0" encoding="UTF-8"?>
<!--
This file was created using LexGrid. You can find out more about LexGrid
at http://informatics.mayo.edu/ .
Generated at: 12/9/05 7:09 AM
Generated by: org.LexGrid.commons.model.emf, v0.6.0
-->
<codingScheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:schemaLocation="http://LexGrid.org/schema/2005/01/LexGrid/codingSchemes
http://LexGrid.org/schema/2005/01/LexGrid/codingSchemes.xsd";
xmlns="http://LexGrid.org/schema/2005/01/LexGrid/codingSchemes";
xmlns:lgBuiltin="http://LexGrid.org/schema/2005/01/LexGrid/builtins";
xmlns:lgCommon="http://LexGrid.org/schema/2005/01/LexGrid/commonTypes";
xmlns:lgCon="http://LexGrid.org/schema/2005/01/LexGrid/concepts";
xmlns:lgCS="http://LexGrid.org/schema/2005/01/LexGrid/codingSchemes";
xmlns:lgLDAP="http://LexGrid.org/schema/2005/01/LexGrid/ldap";
xmlns:lgNaming="http://LexGrid.org/schema/2005/01/LexGrid/naming";
xmlns:lgRel="http://LexGrid.org/schema/2005/01/LexGrid/relations";
xmlns:lgService="http://LexGrid.org/schema/2005/01/LexGrid/service";
xmlns:lgVD="http://LexGrid.org/schema/2005/01/LexGrid/valueDomains";
xmlns:lgVer="http://LexGrid.org/schema/2005/01/LexGrid/versions";
approxNumConcepts="55" codingScheme="beer" defaultLanguage="en"
formalName="beer"
registeredName="localName=1.9.102,ne=1.3.6.1.4.1.2114.108,ra=ISO"
representsVersion="0.1" xsi:noNamespaceSchemaLocation="lexgrid.xsd">
<lgCommon:entityDescription>An ontology that models types of beer and
brewers/brands.</lgCommon:entityDescription>

....







Archive powered by MHonArc 2.6.24.

Top of Page