Hi Jose, you're not bothering me with your questions, this is the right list to ask. I started writing a reply to you a week ago but haven't had time to properly finish it. The important part is missing, because I didn't finish it myself yet. Now I'll send at least the replies to your questions that I have written up and (hopefully) catch up later.
On Thu, Oct 11, 2012 at 5:06 PM, Jose Blanco <[email protected]> wrote: > This is a composite type and perhaps that is why. I can > match the Title just fine ( this one is jut a text type )? If by composite type you mean tree fragment as opposed to a leaf element, then no, that's not the reason. The reason is that some other template had higher (implicit) priority than yours. Remember this? On Wed, Oct 10, 2012 at 8:19 PM, helix84 <[email protected]> wrote: > You can have one template that matches the parent element, and another > one that matches its child element. The one matching parent will be > used, simply because the parser always encounters the parent first in > the input document. I admit the parent template can be sometimes hard to find. Basically you have to search for occurence of the parent element and then its parent etc. In this case, it's this element that is matched: Mirage/lib/xsl/core/forms.xsl:35 <xsl:template match="dri:list[@type='form']/dri:item" priority="3"> You can ignore the first part. In the second part you can see that for dri:field[@type='composite'], the familiar apply-templates is called, but with a twist: the mode attibute. What is mode? You can see that on a simple example: http://www.dpawson.co.uk/xsl/sect2/modes.html But nevermind that, let's do what we came here to do, and match the author last name: [TODO] > I append DRI to > the url to see that dri structure, and that's how I came up with the field > name. Here is the match I'm trying to use: You did that well. > Also, why have "dri:", I don't see that in the xml? You don't see dri: because we're using dri as the default namespace. Read more about default namespace here: http://www.w3schools.com/xml/xml_namespaces.asp and notice the DRI document element which declares namespaces (just the default ones in this case): <document xmlns="http://di.tamu.edu/DRI/1.0/" xmlns:i18n="http://apache.org/cocoon/i18n/2.1" version="1.1"> Just out of curiosity, look at your .xsl files and you'll see a lot of namespaces declared there. You'll notice that in there, XHTML is declared as the default namespace, so you don't need to prefix it. > I think it must because > there are a few xml's to choose from ( mets and dri )? In case of XMLUI, that might seem true, but it's a rather special case. If you look at Mirage/lib/xsl/aspect/artifactbrowser/item-view.xsl, it may seem so because both namespaces are matched there. But there's some Cocoon magic going on in the background, I don't completely understand it myself. In general (XSLT), you don't choose the input document by matching a prefix. There is one input document in each XSLT transformation. You can include additional documents by using the document call, see here: http://www.w3schools.com/xsl/func_document.asp Cocoon doesn't literally use document(), but something similiar, xinclude and xlink. Again, my knowledge beyond this point is rather limited. Regards, ~~helix84 ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech

