[MarkLogic Dev General] RE: [MarkLogic DevGeneral]ProbleminsertingdefaultnamespaceincreatedXML documentfixed, but validation fails

2010-03-12 Thread Florent Georges
Michael Sokolov wrote: Hi, > Isn't it true that in other contexts one can also declare a > namespace prefix in the processing environment that may not be > available in the document itself? For example, in XSLT I think > this is possible, as well as in a Java processor that > implements XPath.

RE: [MarkLogic Dev General] RE: [MarkLogicDevGeneral]ProbleminsertingdefaultnamespaceincreatedXMLdocumentfixed, but validation fails

2010-03-12 Thread Lee, David
Yes, there are other XML processors that can do this. Saxon, for example, you can pass it in programmatically, and I believe XSLT can. Xmlsh can. So its not unique to XQuery, but I believe its not possible in pure XPath. -Original Message- From: general-boun...@developer.marklogic.com

[MarkLogic Dev General] RE: [MarkLogic DevGeneral]ProbleminsertingdefaultnamespaceincreatedXML documentfixed, but validation fails

2010-03-12 Thread Michael Sokolov
Isn't it true that in other contexts one can also declare a namespace prefix in the processing environment that may not be available in the document itself? For example, in XSLT I think this is possible, as well as in a Java processor that implements XPath. I don't think it's something unique to

Re: [MarkLogic Dev General]ProbleminsertingdefaultnamespaceincreatedXML document fixed, but validation fails

2010-03-12 Thread Florent Georges
"Lee, David" wrote: Hi David (I didn't pay attention who I was responding to ;-)) > The key I re-discovered here is Xquery lets you add that extra > glue to define a prefix outside of xpath, and outside of the > document. Ah I see, yes the declare namespace statement is the key you were afte

RE: [MarkLogic Dev General]ProbleminsertingdefaultnamespaceincreatedXML document fixed, but validation fails

2010-03-12 Thread Lee, David
No thanks, I understand all that about prefixes and URI's. I just didn't realize XQuery could do it because I've ran into this in pure XPath before and couldn't find a way. If a document uses unprefixed URI's there's no XPath syntax to represent that (to my knowledge). While prefixes are mostl

Re: [MarkLogic Dev General]Probleminsertingdefaultnamespaceincreated XML document fixed, but validation fails

2010-03-12 Thread Florent Georges
"Lee, David" wrote: > wow thanks ! I didnt know you could do that. Declare a prefix > for a namespace to query a non-prefixed document without > changing the document. It seems you misunderstood QNames then, as the prefix is non relevant. The name of an element or an attribtue is a QName, tha