Hi,

First, thanks for releasing iText 2.0.8 which is a great package for
generating pdfs and putting xmp metadata in them.

It can do most of what i need, but i have some problems setting a lang
attribute in an element, for certain kinds of deeply nested elements
(<rdf:Seq> and <rdf:Bag>).

I don't have any problem generating metadata like

    <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/";
rdf:about="">
      <dc:format>application/pdf</dc:format>
      .....
      <dc:description>
        <rdf:Alt>
          <rdf:li xml:lang="en">blah blah</rdf:li>
        </rdf:Alt>
      </dc:description>
      <dc:title>
        <rdf:Alt>
          <rdf:li xml:lang="en>blah blah</rdf:li>
        </rdf:Alt>
      </dc:title>
      .....
    </rdf:Description>

This comes from code like
      XmpWriter xmp=new XmpWriter(baos);
      DublinCoreSchema dc=new DublinCoreSchema();
      LangAlt titleAlt=new LangAlt();
      title="blah blah";
      titleAlt.addLanguage("en",title);
      dc.setProperty(DublinCoreSchema.TITLE,titleAlt);
      .....
      xmp.addRdfDescription(dc);

I can also generate
      <dc:date>
        <rdf:Seq>
          <rdf:li>blah blah</rdf:li>
        </rdf:Seq>
      </dc:date>
      <dc:type>
        <rdf:Bag>
          <rdf:li>blah blah 1</rdf:li>
          <rdf:li>blah blah 2</rdf:li>
        </rdf:Bag>
      </dc:type>
by using
      XmpArray someBag=new XmpArray(XmpArray.UNORDERED);
      XmpArray someSeq=new XmpArray(XmpArray.ORDERED);
instead of LangAlt.

But what i'd like to get would be the inner <rdf:li/> elements to have
lang attributes, as in
          <rdf:li lang="x-default">blah blah</rdf:li>
or
          <rdf:li lang="en">blah blah</rdf:li>

How can i do this in a programmatic way (so that everything in sight
is a variable), short of subclassing DublinCoreSchema and maybe a
bunch of other classes?

(It would also be nice to be able to order the DublinCoreSchema elements,
but that's a much greedier request to make, and perhaps doesn't even
make sense if the order for DublinCore is deliberately insignificant.
I'm too ignorant to know what would be unreasonable here.)

Thanks in advance for any info, and thanks again for sharing
iText 2.0.8 with the world.

dan





-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to