XSLT to grab dynamic metadata from a folder and content/data def info from a child block

James's Avatar


04 Feb, 2011 04:36 PM

How do I write an XSLT format to grab not only a folder’s dynamic metadata, but also the content/data def info from a block that is a child of that folder? I can do each separately, but I want their info united via a format.

  1. 1 Posted by Amy on 04 Feb, 2011 06:19 PM

    Amy's Avatar

    Is your question regarding how to create an index block that includes both sets of information or how to write the format to transform both sets of information that you already have in an index block? If the latter, can you attach either XML from the index block you're using or the format that you have so far? This would help us better identify the problem you're having.


  2. 2 Posted by Jamie johnson on 04 Feb, 2011 06:45 PM

    Jamie johnson's Avatar

    I have dynamic metadata attached to a folder.
    In side that folder, I have a Data Definition -based block that renders
    the following XML:

    <?xml version="1.0" encoding="UTF-8"?>
    <article_title>article title</article_title>
    <article_summary>article summary</article_summary>
    <article_content>article content<br /></article_content>

    I am trying to write a format that can pull both the dynamic metadata
    and name of the folder and the data from the XML above.

    James "Jamie <http://people.jmu.edu/johns2ja>" Johnson, BBA, MA, A+
    <http://certification.comptia.org/a/>, ACHDS
    <http://train.apple.com/certification/achds.html>, HDA
    <http://www.thinkhdi.com/certification/individualCertification/hdm.aspx>, MOS
    W3S/HTML <http://www.w3schools.com/cert/cert_html.asp>
    JMU Information Technology Web Developer
    Browser Detection and Test

    /"Test everything. Hold on to the good."/
    1 Thessalonians 5:21

  3. 3 Posted by Amy on 04 Feb, 2011 07:04 PM

    Amy's Avatar

    You'll want to first create an index block that contains both the dynamic metadata for the folder as well as the data definition block before worrying about how to write the format.
    1. Create a new Index Block
    2. Select your folder as the "Index Folder", set "Depth of Index" to 1 (or greater), and check "Blocks" for the "Indexed Asset Types"
    3. Select "Render XHTML, XML, and Text block XML inline"
    4. For "Indexed Asset Content", select at least Regular Content and User Metadata
    5. Click "Submit" to create this block
    6. Assign this block to your page or template region
    7. Write an XSLT format to style the XML information from your index block and assign it to the same page or template region as #6 above

    Please let us know if you need any further assistance.

  4. 4 Posted by Jamie johnson on 04 Feb, 2011 07:07 PM

    Jamie johnson's Avatar
  5. 5 Posted by Amy on 04 Feb, 2011 07:16 PM

    Amy's Avatar

    If you can move the dynamic metadata fields into the data definition, that is certainly an option as well; It really depends on how you want to organize your information, whether or not it those fields make sense being attached to a folder more than being attached to a block, and what they're used for.

  6. 6 Posted by Jamie johnson on 04 Feb, 2011 07:46 PM

    Jamie johnson's Avatar
  7. Tim closed this discussion on 08 Feb, 2011 09:25 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac