On Wed, Aug 5, 2009 at 9:42 AM, Simon Lessard<[email protected]> wrote:
> Hmm,
>
> I used the latest nightly build when I integrated the code. However, that
> was about 3~4 months ago, so maybe it changed a little since then, or there
> was another usable branch that I was unaware of. That being said, maybe we
> should add the required changes by ourselves. Even if Facelets is ASL 2.0, I
> think it would be healthy to have 2 different implementation in case one
> produces an innovation that could improve performance or another aspect of
> it.
>

OK, so assuming everyone is OK with modifying the code instead of
trying to upgrade...

What I'm looking at is handling the parsing of old Facelets taglib
documents that rely on DTDs and no namespaces and new Facelets taglib
documents that rely on Schema validation and are namespace-aware.

These are the issues as I see them:

* Calling setValidating(true) on the parser creates a parser that
expects a DTD for validation, so we have to do that for one case and
not the other.
* The document I have -- and I expect this is true for all the ones
you'd find in real situations -- declares the schema via
xsi:schemaLocation.  I don't believe there is a "truly" JAXP way to
create a parser that ONLY does schema validation AND uses the
xsi:schemaLocation attribute to determine the location of the schema.
Instead, you have to call setSchema() and provide the location
yourself.  There is a Xerces-specific property that can accomplish
this, but it's not wise to rely on that.
* How do you determine how to do the dual parsing?  Open the document
as text and grep for a DOCTYPE?  The version?  The xsi:schemaLocation
attribute?

What does everyone think?


Thanks,


Curtiss Howard

Reply via email to