Dominic Marcotte | 1 Sep 2009 22:42
Picon
Favicon

How to add a class attribute to a image

Hello,

I want to add a class attribute to my img tag.

      <informalfigure role="test1">
        <mediaobject role="test2">
          <imageobject  role="test3">
            <imagedata  role="test4" 
fileref="images/articles/common_law.png"/>
          </imageobject>
          <textobject><phrase>alt</phrase></textobject>
        </mediaobject>
      </informalfigure>

but the role attribute dont generate a class attribute.

<div class="informalfigure">
    <div class="mediaobject">
        <img alt="alt" src="images/articles/common_law.png"/>
    </div>
</div>

Any idea?

Dominic
Dave Pawson | 4 Sep 2009 14:13
Picon

literal element db v5

I'm transforming from a 'visual' markup language (a wiki)
and I've come across 'monospace' as markup.

My best guess docbook 5 equivalent would be literal.
In order to not lose the semantics, I want looking
for the role attribute. literal has common
attributes, but role isn't one of them?

yet in the xi schema I see
   <define name="db.literal.role.attribute">
       <attribute name="role"/>
     </define>
     <define name="db.literal.attlist">
       <interleave>
         <optional>
           <ref name="db.literal.role.attribute"/>
         </optional>
         <ref name="db.common.attributes"/>
         <ref name="db.common.linking.attributes"/>
       </interleave>
     </define>
     <define name="db.literal">
       <element name="literal">
         <a:documentation>Inline text that is some literal 
value</a:documentation>
         <ref name="db.literal.attlist"/>
         <ref name="db._text"/>
       </element>

Is this a docbook omission?
(Continue reading)

Dick Hamilton | 4 Sep 2009 18:28
Favicon
Gravatar

RE: literal element db v5

Dave,

role is a valid attribute on literal and is a common
attribute.

I think the confusion is in the way it is defined in
the schema. While it is a common attribute, it is not
defined in db.common.attributes.

Instead, it is defined using a separate name for each
element (that's why you have db.literal.role.attribute).

Since role is user-defined, creating separate names for
each element lets customizers define the contents of
role independently for different elements.

So, it's a common attribute by virtue of being common,
but is defined separate from db.common.attributes so
that it can be customized.

BTW, literal is probably as close as you'll get for a
generic replacement for monospace.

Hope that helps.

Dick Hamilton
---------------------------------
XML Press
XML for Technical Communicators
http://xmlpress.net
(Continue reading)

Jirka Kosek | 4 Sep 2009 19:55
Picon
Favicon
Gravatar

Re: Copyright/license of transition guide?

Daniel Leidert wrote:

> If you decide for e.g. the CC-BY-ND license, I have to remove the howto
> from the Debian package and it won't be shipped to our users. Sorry, but
> I'm not willing to put the DB5 schemas into our non-free section just
> for this howto. However, I would much prefer to not have to do this.

You can now assume that how-to is covered by

http://creativecommons.org/licenses/by-sa/3.0/

which should be compatible with Debian.

			Jirka

--

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka <at> kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------

Dave Pawson | 5 Sep 2009 06:24
Picon

Re: literal element db v5

On 04/09/09 17:28, Dick Hamilton wrote:
> Dave,
>
> role is a valid attribute on literal and is a common
> attribute.

> Since role is user-defined, creating separate names for
> each element lets customizers define the contents of
> role independently for different elements.
>
> So, it's a common attribute by virtue of being common,
> but is defined separate from db.common.attributes so
> that it can be customized.

So it is a tdg omission then?

Thanks Dick, I'll look for it in the new edition!

regards

--

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
Norman Walsh | 5 Sep 2009 13:59
Favicon
Gravatar

Re: literal element db v5

Dave Pawson <davep <at> dpawson.co.uk> writes:

> On 04/09/09 17:28, Dick Hamilton wrote:
>> Dave,
>>
>> role is a valid attribute on literal and is a common
>> attribute.
>
>> Since role is user-defined, creating separate names for
>> each element lets customizers define the contents of
>> role independently for different elements.
>>
>> So, it's a common attribute by virtue of being common,
>> but is defined separate from db.common.attributes so
>> that it can be customized.
>
> So it is a tdg omission then?

Well. At the very least, it's not very clear :-)

  http://docbook.org/tdg5/en/html/ch05.html#ch05-classrole

                                        Be seeing you,
                                          norm

--

-- 
Norman Walsh <ndw <at> nwalsh.com> | Men are more like the times they live
http://nwalsh.com/            | in than they are like their
                              | fathers.--Ali Ibn-abi-talib
(Continue reading)

Dave Pawson | 5 Sep 2009 14:55
Picon

Re: literal element db v5

On 05/09/09 12:59, Norman Walsh wrote:
> Dave Pawson<davep <at> dpawson.co.uk>  writes:
>

>>> role is a valid attribute on literal and is a common
>>> attribute.

>> So it is a tdg omission then?
>
> Well. At the very least, it's not very clear :-)
>
>    http://docbook.org/tdg5/en/html/ch05.html#ch05-classrole
>
>                                          Be seeing you,
>                                            norm
>

OK. Mmm. My problem I guess. I'd always noted odd
'omissions' in tdg, but assumed the content accurate.
Noting it wasn't showing at
http://docbook.org/tdg5/en/html/literal.html

I presumed it not valid.

Is it  one of those 'common' 'common' groupings?
Perhaps visible off
http://docbook.org/tdg5/en/html/ref-elements.html#common.attributes

Request that it be shown, if 'doable' please?

(Continue reading)

Dick Hamilton | 5 Sep 2009 20:29
Favicon
Gravatar

RE: Re: literal element db v5

I'll put that on the list of things to clarify
as we work on the next edition.

Dick

---------------------------------
XML Press
XML for Technical Communicators
http://xmlpress.net
(970) 231-3624 

> -----Original Message-----
> From: Norman Walsh [mailto:ndw <at> nwalsh.com] 
> Sent: Saturday, September 05, 2009 6:00 AM
> To: Dave Pawson
> Cc: Dick Hamilton; 'docbook'
> Subject: [docbook] Re: literal element db v5
> 
> 
> Dave Pawson <davep <at> dpawson.co.uk> writes:
> 
> > On 04/09/09 17:28, Dick Hamilton wrote:
> >> Dave,
> >>
> >> role is a valid attribute on literal and is a common
> >> attribute.
> >
> >> Since role is user-defined, creating separate names for
> >> each element lets customizers define the contents of
> >> role independently for different elements.
(Continue reading)

Peter Flynn | 7 Sep 2009 00:57
Picon
Favicon

ANN: XML Summer School in Oxford, 20-25 Sept

For those who may have been away and missed the earlier announcement,
the XML Summer School returns this year at St Edmund Hall, Oxford from
20th-25th September. As always, it provides high quality technical XML
training for every level of expertise, from the Hands-on Introduction
through to special classes devoted to XSLT, Semantic Technologies, Open
Source Applications, Web 2.0 and Web Services. The Summer School is also
an opportunity to experience what life is like as a student at one of
the world's oldest Universities.

Classes are taught by some of the most renowned XML experts,
including Eve Maler, Michael Kay, Jeni Tennison, Michael Sperberg
McQueen, Norm Walsh and Bob DuCharme.

Details are at http://www.xmlsummerschool.org/

///Peter
Norman Walsh | 8 Sep 2009 15:09
Favicon
Gravatar

Re: literal element db v5

Dave Pawson <davep <at> dpawson.co.uk> writes:
> OK. Mmm. My problem I guess. I'd always noted odd
> 'omissions' in tdg, but assumed the content accurate.
> Noting it wasn't showing at
> http://docbook.org/tdg5/en/html/literal.html

It doesn't show directly, but if you click through to "common attributes",
you'll find it listed.

> Is it  one of those 'common' 'common' groupings?
> Perhaps visible off
> http://docbook.org/tdg5/en/html/ref-elements.html#common.attributes
>
> Request that it be shown, if 'doable' please?

Listing all 20 common attributes on every page would be confusing, I
think, and it would really hide the "unique" attributes on those
elements that have them.

                                        Be seeing you,
                                          norm

--

-- 
Norman Walsh <ndw <at> nwalsh.com> | Some people tell you you should not
http://nwalsh.com/            | drink claret after strawberries. They
                              | are wrong.--William Maginn

Gmane