How do I clear the expanded tree cache? Tim
-----Original Message----- From: Mary Holstege [mailto:[email protected]] Sent: Saturday, July 12, 2014 9:56 PM To: 'MarkLogic Developer Discussion'; Tim Subject: Re: [MarkLogic Dev General] Strict validation error encountered in ML7 but not in ML6 On Sat, 12 Jul 2014 12:45:47 -0700, Tim <[email protected]> wrote: > After a little more investigating, it looks like there is a problem > updating a schema. In this case I'm simply adding some optional > element attributes to the schema and updating it in the schemas > database, but strict validation of a document is failing. When I > revert back to the previous schema it validates just fine. What is up with > that? A couple of thoughts here: Do you have other schemas around for the same namespace? Unless you are very careful with schema locations in that case, the lookup-by-namespace may grab the wrong one. You might also try clearing the expanded tree cache after loading a new schema. The schema information associated with a particular document is cached in the representation of it in the expanded tree cache and that can be sticky across changes to a particular schema stored in the database. The system isn't really designed to accommodate on-the-fly schema changes like that. > It also appears that my schema was updated automatically at some point > to include the use="optional" attribute for optional schema > attributes and that elements were updated with the nillible="false" and > abstract="false" attributes. > I don't understand why this happened. Fortunately the update posed no > problems with validation, but it is out of sync with the original > schema in my repository > - kind of weird. I think what you are seeing here is defaulted attributes being serialized. (They are getting defaulted from the schema-for-schemas). This is a serialization issue entirely, and there are controls for when they get included in serialization. I suspect you may be copying the schema XDM instance in some way, because the default is to not include them in the serialization. More recent versions avoid serializing them on copies as well. //Mary _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
