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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] Allow <info> as root element?


Hi,

On 30.11.22 14:05, Dave Pawson wrote:

Sure it can work. However, if I load a file with <info> as root, my XML editor
_will_ complain. To avoid it, I'm forced to either a) make a DocBook
customization and allow <info>, or b) wrap artificial structural DocBook
elements around. Both are problematic in their own ways as I was trying to explain.

I simply don't see how? Docbook is flexible and RNG allows v.easy customization?
If your editor doesn't do what you want, use another tool?

That's not the point. It's not about my XML editor, it's about the DocBook
schema that doesn't allow <info> as possible root element.

If I use the standard DocBook (without customization) I have the limitation
described above.


[...]
Yes, technically possible, but still a restriction. Additionally, I'm forced to
add an XPointer expression into the <xi:include> element just to select the
info. Sounds like a detour to me. :)

Sorry, not to me. Never used xpointer  for such.
Unsure why you need to link into the 'external' info section, especially the way
you say you want to use it?

See, you also agree it would be cumbersome. ;)

Let's assume I want to share an <info> element between different articles. We
use standard DocBook.

As standard DocBook doesn't allow <info> as root, I have to wrap some
artificial element around my <info>. Could be basically anything that is
possible as start element. Maybe we use <topic>:

-----[ metadata.xml ]
<topic>
   <title>...</title>
   <info xml:id="metadata">
     <!-- my metainformation that I want to share between my articles -->
   </info>
</topic>
-----

In my real articles, I have to link to this artificial article.

-----
<article>
  <title>...</title>
  <xi:include href="metadata.xml" xpointer="metadata"/>
</article>
-----

Sure, if I remove the artificial <topic>, we could avoid this xpointer
attribute. However, that would render my metadata.xml in my XML editor as invalid.


XIncludes aren't the problem per se. Maybe it works for your documents. I'm
glad it works for you. But not all documents are the same. If we can't use
<info> as root, we are forced to do all sorts of workarounds. Perhaps it was
always the case.

But you can with one line of rng?

If you customize it, it's not DocBook anymore. :)

I've described a solution in another mail to Norm. Perhaps it would be needed
to create another, _official_ customization like the Publishers, ITS, and the
others that are offered. This schema could allow <info> as additional root
element. Problem solved, XML editor happy.


However, in terms of topic-oriented writing, it becomes annoying when you are
restricted by the schema.

Which sounds like the schema is the problem?

Yes, that's what I'm saying. :-)


Validation is a tool to use for your own workflow.

And...?


Probably it boils down to that DocBook allows many ways to process it. Some
produce valid results other invalid intermediate results or something in
between. DocBook doesn't define one way to do it, for the better or worse.

For many of us (me included) it is for the better. I took the work the group did
and adapted it for my use? Sounds like you could do the same and are quite
resistant to such adaptation?

I see the flexibility of DocBook also as an advantage. This flexibility works
quite well with classic documentation which follows books or articles. However,
it falls a bit apart when you try to follow a more topic-oriented approach.


--
GruÃ/Regards
  Thomas Schraitle



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