[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: db5.0b3 xi:xinclude in info element
That was it! Thanks indeed. I seem to have some kind of blind spot with namespaces. Nothing seems intuitive, and I'm always tripping over stuff like this. Cheers, Martin George Cristian Bina wrote: > Hi Martin, > > The problem in your case is that the author element that you include is > in no namespace and author in no namespace is not allowed inside info > from the http://docbook.org/ns/docbook namespace. Probably you have the > DocBook namespace defined as default namespace and thus it is very easy > to get into this problem. Try adding > xmlns="http://docbook.org/ns/docbook" in the document you include to > place that in the DocBook namespace and everything should work. > > When oXygen validates DocBook against Relag NG and you enable the > XInclude processing then it validates the content after expanding the > XInclude elements. If you disable the XInclude processing then oXygen > will validate the content of only that file, without expanding the > XInclude elements. > > Below you can find a valid DocBook sample that includes an author > element with XInclude: > > test.xml > > <?xml version="1.0" encoding="UTF-8"?> > <book xmlns="http://docbook.org/ns/docbook"> > <info> > <title></title> > <xi:include href="author.xml" > xmlns:xi="http://www.w3.org/2001/XInclude"/> > </info> > <article> > <title>Test</title> > <para>test</para> > </article> > </book> > > author.xml > > <?xml version="1.0" encoding="UTF-8"?> > <author xmlns="http://docbook.org/ns/docbook"> > <personname>George Bina</personname> > </author> > > Best Regards, > George > --------------------------------------------------------------------- > George Cristian Bina > <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger > http://www.oxygenxml.com > > > Martin Holmes wrote: >> I have exactly the same problem in oXygen. I'm using the RelaxNG >> schema with XI support. It's annoying, eh? There's not much point in >> XIncludes unless you can put them wherever you want. >> >> The error message in oXygen is misleading; it tells me the <author> >> element is illegal (that's the root tag in my XIncluded document), but >> when I put the same code directly into the info tag it has no problem >> with it. THe problem must be with the XInclude tag itself, but perhaps >> the parser hits the problem but resolves the XInclude before reporting >> the error message. >> >> Cheers, >> Martin >> >> >> Chris Chiasson wrote: >>> I wanted to xinclude part of my default author file into the info >>> element of a book and docbook 5 (okay, emacs nxml mode) said, "Element >>> not allowed in this context". >>> >>> :-[ >>> >>> Is this supposed to happen? >>> >>> -- >>> http://chris.chiasson.name/ >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org >> For additional commands, e-mail: docbook-help@lists.oasis-open.org >>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]