5 Responses to “XForms and CSS”

  1. Ryan Wick Says:

    I finally have been working with XForms the last few weeks, although I still have a ways to go for our simple MODS form. Yesterday I made some progress on the authority control situation that you bring up, and now have the basic parts working. The authority data, just names for now, has all the relevant MODS tags stored in an external file (/authorities/personalnames.xml). This is brought in as an instance, populating a select1 element. But the trick to copying multiple tags and/or a whole structure is the copy element, which I just discovered, and it made all the difference.

    I still have some issues with the hierarchy and the record template (right now the output results in mods:name/mods:name/mods:namePart for instance) and things are pretty basic still as I get them working.

    Here is the file in our Trac/Svn: https://trac.library.oregonstate.edu/projects/spcoll/browser/xforms/calendar/calendar.xhtml?rev=988#L83
    Here is the beginnings of my XForms notes: https://trac.library.oregonstate.edu/projects/spcoll/wiki/XForms

    I don’t really have a live version of the form to see, but you can just copy the source code to a local xhtml file.

    Hope this helps. Thanks again for sharing your experiences (although I’m very behind reading Planet Code4lib, I saw this post in #code4lib). Your MODS files that made it into the Code4Lib XForms SVN were a great help as I started figuring out the building blocks.

  2. Ryan Wick Says:

    Bah. I wasn’t kidding when I said I was behind reading Planet Code4Lib. I was reading some old posts on here just now and saw your post on Sept. 17 where you talked some more about pulling the data out of other files and such. So I’m not sure if what I’ve posted in the previous comment will be useful to you or not. I should try to stay more current :)

  3. wsalesky Says:

    Hi Ryan,
    Are you using the firefox extension? I’ve found that xforms:copy is a bit problematic, particularly for inserting multiple child nodes. You can, however, use just regular old insert, which pulls the nodes you want to “copy” from another instance. (I posted about that in the September 17th post.) This solution does seem to be a little buggy still when used in a repeat, I’m still working on it, but it seems to be an easier solution than trying to get xforms:copy to work correctly.

    Part of my hesitation about authority control, is whether or not to do what you have done, or to do something more complex, involving authority records encoded in MADS. I’m guessing time will solve this problem for me, and I will end up using some combination of the subject look-up (posted about here)
    and a phasing in of MADS records.

    Perhaps it is time to look into getting the xforms@code4lib SVN back up so that we all can make our code available in a single place.

  4. Ryan Wick Says:

    Yeah, we’re using the Firefox extension.

    I’ll have to take a look at insert. Copy seems so close though.

    The suggest feature you got working is pretty slick.

    I’m not sure exactly how and when we’d start using MADS and how that would fit in. Yet another thing to keep watching.

    Yeah I’m definitely in favor of getting the SVN back up, hopefully with Trac too so we can collaborate on some decent docs/best practices type stuff. I’ll see if I can give this another nudge…

  5. wsalesky Says:

    Well, let me know if you get copy to work. As far as I can tell you can not insert multiple child nodes, or you end up with the results you mentioned (the nested parent: mods:name/mods:name).

Comments are closed.


%d bloggers like this: