RE: Basic schema validation problem

2001-08-30 Thread James Liu
Title: RE: Basic schema validation problem make sure your name space in .xml and .xsd is like : "http://www.w3.org/2001/..." good luck. -Original Message- From: Phil Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 4:28 PM To: [EMAIL PROTECTED] Subject: Basic s

RE: Parser locating of schema documents

2001-08-30 Thread Chris Halverson
Title: RE: Parser locating of schema documents Yup that would work but my preference would be to use the parser options as specified.  Anyone know if the one described in my original email works. -Original Message- From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] Sent:   Thursday, A

Basic schema validation problem

2001-08-30 Thread Phil Mitchell
Using xerces 1.4.2 I have been able to validate against a DTD, but not a schema. I get the following error: Message: Attribute "xmlns:xsi" must be declared for element type "personnel". I am using the sample data (personal-schema.xml) provided with xerces. Is this version not schema-aware? Do I s

Re: JAXP and serialization APIs

2001-08-30 Thread Bob Jamison
Swanson, Brion wrote: I know that JAXP is a common API for parsing XML (that is, you can plug any compliant XML parser in without changing any code), but is there anything like that for serializing a Document? I am probably wrong, but I believe that is an upcoming DOM level 3 feature. Is that rig

Re: Access to validator info

2001-08-30 Thread Jessica Perry Hekman
On Thu, 30 Aug 2001, Andreas [iso-8859-1] Thönnessen wrote: > My idea was, that the validotor should allready have this > information. The XMLContentModel provides a method whatCanGoHere() > which looks quite like what I want. But I don't have any clue on how > to access this... I got this workin

RE: Parser locating of schema documents

2001-08-30 Thread tushar . dave
Title: Parser locating of schema documents I subclass of org.apache.xerces.parsers.SAXParser and in that class I add a method This works. e.g public class newParser extends org.apache.xerces.parsers.SAXParser {    /*  stValue=""http://www.ncube.com/2001/nable/1.7 /usr/ncube/et

Parser locating of schema documents

2001-08-30 Thread Chris Halverson
Title: Parser locating of schema documents Thanks Neil, that did it. Now I have another question in line with John Powell's most recent send. I've tried setting the external-schemaLocation property on the parser to abstract my schema and instance documents from needing to know the exact loca

Re: JAXP and serialization APIs

2001-08-30 Thread jean-guillaume . battaglia
Hello people.   Yes, you can use an identity transform :   use the method newTransformer() (class TransformerFactory) with no parameter.   Another way is to use JDOM which is almost a JDK API (that is to say, not an implementation).

Re: DTD validation

2001-08-30 Thread Andy Clark
Amedeo Farello wrote: > I would expect, from what I have understood about DTDs (which could not be > enough, I admit) that a validating parser should raise an exception indicating > the presence of a element outside of a element. Instead > Xerces > parses such a file without problems. You must

Relative paths in SchemaLocation and Import

2001-08-30 Thread John Powell
Hi, I need to have one schema import another one, but I don't want to use an absolute path in the import. I have http://www.ara.com/base"; schemaLocation="base.xsd"/> in another schema named ext.xsd. Both schemas are in a folder called D:\Schemas and my instance files are in a folder called D:\Ins

RE: JAXP and serialization APIs

2001-08-30 Thread Swanson, Brion
Thank you. I think that's exactly what I was looking for. Much appreciated! -- Brion Swanson - West Group / Rochester, NY mailto:[EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 30, 2001 7:32 AM To: [EMAIL PROTECT

RE: JAXP and serialization APIs

2001-08-30 Thread Li Liang
You can use a dummy javax.xml.transform.Transformer A psudo code snip: Transformer transformer = TransfomerFactory.newInstance().newTransformer(); transformer.transform(new DOMSource(yourDOM), New StreamResult(yourStream)); You need Xalan for this. -- Li Liang -Original Message- Fro

Re: JAXP and serialization APIs

2001-08-30 Thread jean-guillaume . battaglia
Hello people. I'm not sure about what you want to do exactly but if you want to serialize an XML document, the best way to do it is to serialize it in a text file (i.e. an XML file). And for this, you can use JDOM which is almost a JDK API (that is to say, not an implementation).  Hope that helps. 

Re: JAXP and serialization APIs

2001-08-30 Thread Scott_Boag
If you look at javax.xml.transform, you can do what is termed an identity transformation, which is essentially serialization. This allows you to serialize SAX events, DOM trees, or re-serialize a stream. As a serializer it is a bit limited in it's ability to handle doc type stuff, but in other w

Re: Validation and schema hierarchies

2001-08-30 Thread neilg
Hi Chris, I notice that your root schema has elementFormDefault="qualified" and your included schema has elementFormDefault="unqualified". Thus the local elements in the included schema are in the null namespace, but your instance document has the default namespace bound to a non-null namespace.

RE: JAXP and serialization APIs

2001-08-30 Thread Reynolds, Ron
sorry for the wasted bandwidth - please ignore my previous stupid answer (hey, it's early!). i often forget that "serialization" in an XML context is a bit different than "serialization" in a Java context. duh! :-/ - To unsubscr

RE: JAXP and serialization APIs

2001-08-30 Thread Swanson, Brion
I'm sorry, I was unclear with my use of 'serialize'. I meant serializing the DOM into XML (as in the org.apache.xml.serialize package). I'd like to have a standard interface for serializing a DOM to XML without having to commit to one particular implementation (such as Xerces implementation). I'

RE: JAXP and serialization APIs

2001-08-30 Thread Reynolds, Ron
do the serialization by hand? serialization requires binary compatibility between objects (with relatively simliar VMs). of course you could always convert the DOM to XML and serialize that, which is probably easier than doing it by hand and has roughly the same result. either way i don't think

Access to validator info

2001-08-30 Thread Andreas Thönnessen
Hi, sorry if this is an "old" question, but the list archive at http://archive.covalent.net seems not to work for some days now (I only get a "document contained no data"). My Problem is: I would like to have access to the info "what element is possible at a certain place in the DOM", during the

JAXP and serialization APIs

2001-08-30 Thread Swanson, Brion
I know that JAXP is a common API for parsing XML (that is, you can plug any compliant XML parser in without changing any code), but is there anything like that for serializing a Document? I must be missing something because I'm not finding any serializers that aren't tied to any given package. Fo

Validation and schema hierarchies

2001-08-30 Thread Chris Halverson
Title: Validation and schema hierarchies I'm getting these errors, I think its a namespace thing but I'm not sure.  I would appreciate any help in the offing. [Error] :8:33: Element type "version" must be declared. [Error] :8:33: Attribute "major" must be declared for element type "version".

RE: DTD validation

2001-08-30 Thread Anish Malhotra
Your XML file and the Dtd is correct . Your dtd correctly says that there will be a name tag inside the content tag. So the parser is correctly not complaining. Enjoy. Anish -Original Message- From: Amedeo Farello [mailto:[EMAIL PROTECTED] Sent: Thursday, August 30, 2001 8:55 AM To

DTD validation

2001-08-30 Thread Amedeo Farello
Hi, I have just started working with DTDs and I feel I am getting strange results from validation. Since I am not an XML expert, I hope someone can help. I will use a minimal example: given the following 'test.dtd': and the following 'test.xml': Cat Dog I would

Loosing encoding

2001-08-30 Thread Andreas Heyde
Hi, How it's possible to get the incoming XML document encoding after parsing a file (parser->parse()) through the API without looking inside the file itself. I'm coming from the C++ side and there a node type XML_DECL_NODE is known (with methods like parser->setToCreateXMLDeclTypeNode()) Thanx