Thanks for the tips.
I actually implemented the serializing into stream and reparsing, but it seems to me like a "bypass" of the problem so does the DOM Level 3 solution.
I would think that in some way either the Transformer or the DOMResult objects could be set with a grammar pool to already produce the compliant DOM held by the DOMResult after transformation. I am less worried about validation (since I hope the xsl I wrote is a correct translation) but I would like to have the elements in the DOM have their attributes set with default values (those that where not set in the xsl).



From: "Jeff Greif" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Re: DOMResult according to schema
Date: Mon, 10 Nov 2003 08:23:29 -0800

The xerces support for DOM Level 3 allows you to validate a document that
has already been parsed into a DOM. The xerces FAQ re DOM covers this. The
xerces FAQ re grammars explains how to preparse and pool grammars.
Jeff


----- Original Message -----
From: "Mike Rawlins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 10, 2003 7:29 AM
Subject: Re: DOMResult according to schema


> Guy,
>
> Part 1 of your question really has nothing to do with Xalan, per
> se. You're asking how to validate an XML instance document, as a DOM
tree,
> against its schema. This depends entirely on your DOM
> implementation. But, assuming you're using JAXP and Xerces, without using
> Xerces-specific classes there aren't very many really graceful or
efficient
> ways to do it.
...


> At 04:56 AM 11/10/2003 -0500, Guy Sharon wrote:
> >Hi,
> >
> >(Two part question)
> >
> >How do I make sure the DOM tree held by the DOMResult object after
> >transformation complies to an XML Schema?
...
> >Second part:
> >How do I use a grammar pool (preparsed schema) to have the DOMResult
> >comply to.


_________________________________________________________________
From Beethoven to the Rolling Stones, your favorite music is always playing
on MSN Radio Plus. No ads, no talk. Trial month FREE! http://join.msn.com/?page=offers/premiumradio



Reply via email to