Xerces schema validation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ole Hedegaard

    #1

    Xerces schema validation

    Hi,

    I've been looking into the Xerces documentation, and to my surprise it seems
    that it is impossible to validate an XML document againts an XML Schema
    without having a schemaLocation (or noNameSpaceSche maLocation) reference in
    the XML document. I basically just want to validate some "foreign" XML,
    which I did not generate myself, against my own Schemas.

    Is that really impossible with Xerces, or am I missing something?

    Thanks,
    Ole Hedegaard


  • Florian Deissenboeck

    #2
    Re: Xerces schema validation

    Of course it's possible. You have to turn on feature

    and let property

    point to your schema. See http://xml.apache.org/xerces2-j/features.html for
    details.
    Flo


    "Ole Hedegaard" <olhed@tdc.dk > schrieb im Newsbeitrag
    news:3fc3c7f0$0 $148$edfadb0f@d read11.news.tel e.dk...[color=blue]
    > Hi,
    >
    > I've been looking into the Xerces documentation, and to my surprise it[/color]
    seems[color=blue]
    > that it is impossible to validate an XML document againts an XML Schema
    > without having a schemaLocation (or noNameSpaceSche maLocation) reference[/color]
    in[color=blue]
    > the XML document. I basically just want to validate some "foreign" XML,
    > which I did not generate myself, against my own Schemas.
    >
    > Is that really impossible with Xerces, or am I missing something?
    >
    > Thanks,
    > Ole Hedegaard
    >
    >[/color]


    Comment

    Working...