OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] xi:include publisher


Hi Peter,

Are you getting this error when you run jing on publisher.xml by itself?

If so, the problem is that <publisher> is not valid as a root element in 5.1, and <legalnotice> is. Since jing is just looking at that file in isolation, it considers the top element in the file to be a root element.

If you resolve the xincludes (you can do that with xmllint --xinclude) to get a single, resolved file, that file should validate successfully (assuming everything else is ok).

DocBook 5.1 added a lot more elements as valid root elements (though not <publisher>), but even before 5.1, I often xincluded files that had "illegal" root elements. I just avoided checking syntax until after resolving the xincludes.

I normally don't use xsltproc, but I did try using it (with the --xinclude option) with the example you gave (local files only), and it resolved the xincludes without complaint and ran a transform successfully.

If xsltproc is failing, then please post the error message it gives you and the command line you used.

Also, if you haven't already, you might want to try doing this with a local file and see if that makes a difference.

Hope that helps.
Richard
-------
XML Press
XML for Technical Communicators
http://xmlpress.net
hamilton@xmlpress.net



On Jun 26, 2015, at 13:05, Peter Fleck <peterfleck@gmail.com> wrote:

> Hi Richard,
> 
> JIng gives me error: element "publisher" not allowed here; expected element .... and a long list.
> 
> I was using xsltproc
> 
> The start of the publisher.xml file is:
> 
> <?xml version='1.0' encoding='UTF-8'?>
> <publisher xmlns='http://docbook.org/ns/docbook'
>  xmlns:svg='http://www.w3.org/2000/svg'
>  xmlns:xlink='http://www.w3.org/1999/xlink'
>  xmlns:xi='http://www.w3.org/2001/XInclude' version="5.1" xml:lang="en" xml:id="publisher">
> 
> It works fine for <legalnotice> which gets included in the output, publisher does not.
> 
> So I have
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <book xmlns="http://docbook.org/ns/docbook"; xmlns:svg="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:xi="http://www.w3.org/2001/XInclude"; version="5.1" xml:lang="en" xml:id="idname">
>  <info>
>    <title>Book Title</title>
>    <subtitle>Subtitle</subtitle>
>    <author>
>      <personname>
>        <firstname>Bob</firstname>
>        <surname>Smith</surname>
>      </personname>
>    </author>
>    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="http://......./publisher.xml";>
>      <xi:fallback>Publisher Missing</xi:fallback>
>    </xi:include>
> 
> Thanks,
> 
> Peter
> 
> 
> On 26/06/15 20:30, Richard Hamilton wrote:
>> Hi Peter,
>> 
>> What error did you get and what software were you using to do the includes?
>> 
>> Best regards,
>> Richard Hamilton
>> -------
>> XML Press
>> XML for Technical Communicators
>> http://xmlpress.net
>> hamilton@xmlpress.net
>> 
>> 
>> 
>> On Jun 26, 2015, at 11:24, Peter Fleck <peterfleck@gmail.com> wrote:
>> 
>>> HI,
>>> 
>>> I moved our common xml files to a webserver and now publisher does not get included.
>>> 
>>> I'm using the following syntax:
>>> 
>>> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="http://..../publisher.xml"/>
>>> 
>>> It works great for <legalnotice>, for <colophon> etc and it worked when the file was local (though that doesn't mean it was correct).
>>> Is it because <publisher> is not a block item? Is there a better way of including the common <publisher> across documents?
>>> 
>>> Thanks,
>>> 
>>> Peter
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>> 
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]