Re: Other paged media processing approach - summary

> Confusion here.
>  How might the stylesheet writer add that information (without excessive cost?)
> 
> <img src=''
> min-x=''
> min-y=''
> .....
> 
> I.e. where does the user specify that this image might be re-sized in
> order to fit?
> Where do I tell the layout engine that this image (but not that one)
> can be re-sized?

How do you find out which image is allowed to resized? Contrived example (doesn't need groups/virtual pages), if the article number is odd, we resize the image:


<Switch>
  <Case test="sd:odd(@articlenumber)">
    <Switch>
      <Case test="sd:imagewidth('myimage.png') > $somevalue">
        <PlaceObject>
 <!-- image is larger than $somevalue, use $somevalue as image width -->
          <Image file="myimage.png" width="$somevalue" />
        </PlaceObject>
      </Case>
      <Otherwise>
        <PlaceObject>
  <!-- we use the natural image size as the specified width -->
          <Image file="myimage.png" width="sd:imagewidth('myimage.png')" />
        </PlaceObject>
      </Otherwise>
    </Switch>
  </Case>
  <Otherwise>
    <PlaceObject>
      <Image file="myimage.png" width="sd:imagewidth('myimage.png')" />
    </PlaceObject>
  </Otherwise>
</Switch>

(this is more complicated than necessary, because I have not implemented "minimum width" yet. I'd rather go with 

<Switch>
  <Case test="sd:odd($articlenumber)">
    <PlaceObject>
      <Image file="myimage.png" min-width="$somevalue" />
    </PlaceObject>
  </Case>
  <Otherwise>
    <PlaceObject>
      <Image file="myimage.png" />
    </PlaceObject>
  </Otherwise>
</Switch>

The implementation always stays behind the real world usage - time is so scarce. There are lots of areas where I can improve my implementation and add things like min-width and such. There is usually a workaround for everything, but it would be easier to drop me a note that something is awkward to implement in the layout language)


>> 
>> this is a fictitious application/example, but we encounter similar demands. This is not possible by predefining some optimizations in the black box renderer and choose the right one, because it is impossible to anticipate all possible customer demands.
> 
> For *a* definition, that is the only way a user can specify allowable
> optimizations?
>  Do you have a different definition?

(sorry, perhaps too tired - can you rephrase that question?)


Regards, 

Patrick




speedata UG (haftungsbeschränkt)
-------------------------------------
Telefon  030/57705055   
Mobil    0178/1967142
Mail     gundlach@speedata.de
Web      www.speedata.de

Eisenacher Straße 101
10781 Berlin
-------------------------------------
Amtsgericht Charlottenburg HRB 135360 B
Geschäftsführer: Patrick Gundlach
USt-IdNr: DE278023065

Received on Saturday, 9 February 2013 16:20:05 UTC