Re: [1.4.1] Big Problem with schema (& Re: Bug)

2001-06-28 Thread sandygao
Hi JOERN_HEID & Ala, Thanks for your messages concerning this bug. We had problem dealing with "mixed" complexType without child elements. Now it's fixed. Go grab the latest code from CVS, and hopefully, your problems would be solved. Cheers, Sandy Gao Software Developer, IBM Canada (1-416) 448-3

Normalizing an instance in well-formed mode

2001-06-28 Thread O'Leary, Don
Hi guys I am working with an xml instance of an XML Schema (XSDL) document. I need to create the normalized representation of the xml instance. To normalize the instance I believe I need the following information from the schema * Data types for all content and attribute models * Lis

[1.4.1] Big Problem with schema

2001-06-28 Thread Jörn Heid
There are some xml files append to this mail. The about_us.xml file should be validated using schema. This works with xml spy 4.0b1 but using the following code with Xerces-J 1.4.1: import org.apache.xerces.parsers.*; import org.xml.sax.*; import java.io.*; public class TestParse { public s

RE: How to get parser version information ?

2001-06-28 Thread Hunter, Francine
Title: RE: How to get parser version information ? Great thanks ! That will work great. Just curious, do you know if JAXP will provide an interface for a functionality similar to this? Thanks again. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thurs

xml:lang in Schemas

2001-06-28 Thread Shank, Clinton
I posted the following on comp.text.xml, but this may be a better place: I'm using Xerces 1.4.1 and am trying to validate an XML document using a schema. The schema references an xml:lang attribute like this: ... ... I imported the xml namespace near the top of the schema: http://www.w3.org

Re: How to get parser version information ?

2001-06-28 Thread neilg
Hi Francine, There is a class provided with Xerces called org.apache.xerces.framework.Version. It has a public String member called fVersion which stores Xerces version info. Your best bet is to check for the existence of this class and then read the value of fVersion. Hope that helps, Neil Ne

How to get parser version information ?

2001-06-28 Thread Hunter, Francine
Title: How to get parser version information ?     I am using Xerces 1.4 and JAXP. I would like to verify on initialization of my application what version of a parser has been instantiated. Is there an easy way to do this?     For example I would like to do something like:    

Re: key and keyref XML Schema

2001-06-28 Thread Bob Schloss
Kevin, I ran your schema file through the IBM XML Schema Quality Checker tool (the new version which will be on http://www.alphaworks.ibm.com/tech/xmlsqc tomorrow). It pointed out that you did not specify the prefix xsd: on the and element information items, and that the refer=""

problem in VAJ

2001-06-28 Thread Xia, Ralph
Hi, all I imported XJ-1.4.0 into Visual Age for Java 3.5. I get SAXNotSupportedException when I try to set the validation feature on the parser. Please see the sample code below, try { parser.reset(); parser.setFeature ("http://xml.org/sax/features/validation";, validate); }

RE: basic question about xml(another question related to this)

2001-06-28 Thread Ragunath Marudhachalam
Hi All, I have a question in this. After creating a document like that and if i want to send it as a stream, how can i do that. In the earlier version i used XmlDocument class for creating a document and to send the document as stream i used XmlDocumentObject.write(outputstream)... Can an

key and keyref XML Schema

2001-06-28 Thread Kevin O-Riordan
Hi I'm trying to gets this working with xerces-J1.4.1. I read the release notein xerces saying that you had to defined the key and keyref in the same scope but I still failed to get xerces to pick it. Here's a very simple example of what I'm trying to do, any help would be appreciated. Thanks

Re: AW: Xerces 1.4.1/Saxon problem

2001-06-28 Thread Billy L. Williams, Jr.
Hi Frank, I don't know if you have the same thing, but we just ran into a similar situation in a Weblogic application server environment. Turns out that our appserver was setting the javax.xml.parsers.SAXParserFactory system property to a SAX 1.0 parser, and that class didn't implement a method

RE: basic question about xml

2001-06-28 Thread Laurent Forêt
look at DOMCount sample. - Laurent Forêt Service développement [EMAIL PROTECTED] www.korom.net > -Message d'origine- > De : Delahaye, Martial (CAP, CMF, COFRAMI) > [mailto:[EMAIL PROTECTED] > Envoyé : jeudi 28 juin 2001 17:22 > À : [EMAIL PROTECTE

XML Serialization and DTD

2001-06-28 Thread Jordi Massaguer
Hi all! I am trying to serialize a XML document so that I can have an XML file but I have some troubles with the DTD. The first trouble was: I used to have something like this in the original xml-file: "" However, after parsing it and serializing it, it becomes: "" And then when I parse again it d

RE: basic question about xml

2001-06-28 Thread Jessica Perry Hekman
On Thu, 28 Jun 2001, Delahaye, Martial (CAP, CMF, COFRAMI) wrote: > thanks but actually I don't think that this is exactly what I am looking > for. What I really would like to do is to instantiate a XmlDocument just by > providing a xml file. the example DOMGenerate.java creates a document by > pr

RE: basic question about xml

2001-06-28 Thread Gogineni, Pratima
try something like this: try{ DOMParser parser = new DOMParser(); parser.parse("test.xml"); Document doc = parser.getDocument(); }catch(Exception e){ System.out.println("Error: " + e); e.printStackTrace(); } -Original Message--

Re: basic question about xml

2001-06-28 Thread Jordi Massaguer
So maybe you should look the DOMEcho.java example, that parses a XML-file into a Document Object and then goes throw and prints all the nodes. I hope I understood well, if not please ask again. jordi "Delahaye, Martial (CAP, CMF, COFRAMI)" wrote: > thanks but actually I don't think that this is

RE: basic question about xml

2001-06-28 Thread Delahaye, Martial (CAP, CMF, COFRAMI)
thanks but actually I don't think that this is exactly what I am looking for. What I really would like to do is to instantiate a XmlDocument just by providing a xml file. the example DOMGenerate.java creates a document by providing tag names and values. I just want to create it by providing the nam

Re: basic question about xml

2001-06-28 Thread Srinivasan D.
The Xerces distribution has got very good examples to answer your question. If you have downloaded the binary distribution, the source code would be available at samples/dom. Specifically look at DOMGenerate.java. Thats an example to create a DOM object, serialize and display as a string. Hope th

basic question about xml

2001-06-28 Thread Delahaye, Martial (CAP, CMF, COFRAMI)
I have a XMLDocument which is well formatted, let's call it test.xml. I would like to add some element tags to this document. suppose that I give the name of this xml file in entry of a java class (java MyXMLClass test.xml), how could I do that. I suppose that I should create a XmlDocument object

Re: AW: Namespace Prefix necessary with 1.4 ?

2001-06-28 Thread sandygao
Hi Rahul, It works fine with 1.4.0 because that is a bug in 1.4.0, so we fixed it :-) When you refer to a type only by its local name (without a prefix), the parser would first try to bound it to the default namespace. In your example, "MyType" is treated as "http://www.w3.org/2001/XMLSchema,MyTy

Namespace Prefix with 1.4 - Solution

2001-06-28 Thread Harbarth, Juliane
'Solution' is probably saying to much, but, at least, I managed to create two versions of my example that work with Xerces-J 1.4.1 1. Using the namespace prefix all over the place ... 2. Using targetNamespace, this changes the xsd to http://jhb/music"; targetNamespace="http://jh

RE: xerces parsing

2001-06-28 Thread Swanson, Brion
In addition to what has already been stated, you may consider getting all the text node children of your target element. This is because if the DOM Document were created from a series of SAX events then a string such as "Hello World" could have been reported as: "Hello" and " World" possibly resul

RE: Newbie to JAXP / Xerces / Xalan

2001-06-28 Thread Aaron Wadley
I spent a while yesterday looking for this very information. Here's what I came up with. System.setProperty("javax.xml.parsers.DocumentBuilderFactory" , "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"); System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.T

Re: xerces parsing

2001-06-28 Thread Srinivasan D.
Yes, you should get the node values as node.getFirstChild().getNodeValue(); This is because, element values in a Document should be added as text nodes to elements. and getFirstChild() for your node named "Name" will return the textnode. So change your code snippet to node.getFirstChild().getNod

xerces parsing

2001-06-28 Thread Satishkumar
Hi, I have a xml file like, Length 10 I am trying to parse this and get the value of Name using JAXP calls. The code snippet is as below. NodeList nList = ((Document)node).getElementsByTagName(Attr); if ((nList != null) && (nList.getLength()>0)) {

DOM tree validation

2001-06-28 Thread Adam Najmanowicz
is there any possibility to (automatically) validate the generated (not parsed) DOM tree for conformity with the external DTD file before serialization? Adam Najmanowicz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

NullPointerException!

2001-06-28 Thread Ala Heno
Hi,   When running SAXCount sample with the attached XML file (the schema is also attached), I got the following NullPointerException:   java.lang.NullPointerException at org.apache.xerces.validators.common.XMLValidator.pushContentLeafStack(XMLValidator.java:1278) at

Re: AW: Namespace Prefix necessary with 1.4 ?

2001-06-28 Thread Rahul Srivastava
Hi Sandy, I agree with your explanation. But, I don't think I have pointed a different problem. The base line is if a schema works without using prefixes in XJ1.4.0, then why not with XJ1.4.1 (assuming schema has user defined data types and there is no targetNamespace). The schema mentioned be

RE: Unicode hell

2001-06-28 Thread Arash Rejaiyan
ISO-8859-1 is for ANSI not Unicode. -Original Message- From: Gavin Stokes [mailto:[EMAIL PROTECTED] Sent: Thu, June 28, 2001 3:40 AM To: [EMAIL PROTECTED] Subject: Unicode hell Hi all. I'm serializing my DOM doc, and its contents look correct. Except every other character is blank beca

Newbie to JAXP / Xerces / Xalan

2001-06-28 Thread Satishkumar
Hi, I want to use the JAXP interfaces only in my code without explicit imports of specific parsers. The DOMEcho sample in JAXP served my purpose, but documents stated that it will be using Crimpson as the default parser. The JAXP spec mentions about changing the System Property in command line for

Unicode hell

2001-06-28 Thread Gavin Stokes
Hi all. I'm serializing my DOM doc, and its contents look correct. Except every other character is blank because of Unicode. I can not get a single-byte-encoded string of the contents. If I simply open an XML file in a browser (IE 5.5), what format does it expect? Will it open a Unicode-enco