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] EPUB: dbtimestamp PI in pubdate or date

On 18.5.2014 20:10, Thomas Schraitle wrote:
> Yes, I thought about profiling too, but didn't add it to the list. In my 
> opinion, it's a bit "too much": Using profiling just to avoid a conceptual 
> issue in the stylesheet(s) is not the cure, but adds additional burden. :)

You will just import different base stylesheet.

> This issue is exactly the same than selecting the right image format in the 
> mediaobject/imageobject elements by using a role attribute. No profiling is 
> involved and the stylesheets just select the respective image format 
> correctly. You wouldn't recommend to use profiling for just selecting the 
> right image, would you? ;)

If you use different images for HTML and EPUB I probably would.

>> There are dozen of similar cases and there is no direct support for them
>> as well.
> What cases do you have in mind? If there are more use cases, maybe this is an 
> indication that we really need a "best practise".

In EPUB you have different ISBN then in printed version of your book,
some other parts of content has to be adjusted -- for example colophon.

>> I think that for EPUB we can just document the following best practice:
>> <date condition="noepub"><?dbtimestamp?></date>
>> <date condition="epub"><?dbtimestamp format="Y-m-d"?></date>
> Well, maybe, maybe not. Whatever we prefer, I think we have to distinguish two 
> cases in EPUB:
> 1. The date, probably somehow/somewhere definied by the user, which appears on
>    a titlepage.
> 2. The date inside any meta information, usually hidden for the user. 
>    This is required by the EPUB specification.
> For (1) the user can choose whatever he likes. There is no restriction.
> However, for (2) the EPUB demands a YEAR-MONTH-DAY format. Either the user 
> defines it manually or he lets the stylesheet(s) do the correct output.

Well, then easiest solution is to provide template for populating EPUB
field. By default it can put current date into an EPUB file and user can
override it to use different date or populate date dynamically from
source and format it into xs:date format.

> What about the following solution?
>   <date>
>     <?dbtimestamp format="Y, m"?>
>     <?dbtimestamp format="Y-m-d" output="epub"?>
>     <?dbtimestamp format="m (Y)" output="fo"?>
>   </date>

That's messy and hard to process as PI's pseudo-attributes are not
easily accessible in XPath.

> No, I don't use profiling when I create my EPUBs. ;) Nor for other formats. 
> Building EPUBs and other formats doesn't involve necessarily a profiling step. 
> By no means it should be required. 

Then your life and requirements are easy :-)

> We should keep it simple and do the magic in our stylesheets, without any 
> profiling involved or required for this issue.

Profiling is also magic hidden in the stylesheets.

  Jirka Kosek      e-mail: jirka@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 rep.
    Bringing you XML Prague conference    http://xmlprague.cz

Attachment: signature.asc
Description: OpenPGP digital signature

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