Jump to content

Import all Subsets of a node from Pubmed?


vier.gewinnt

This topic is 2666 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi there,

I tried to import data from an xml into Filemaker using an xsl.

It work fine with most of the variables, however I could not master to import all subsets of the abstract, which is organized like this in the xml:

<Abstract>

<AbstractText Label="BACKGROUND" NlmCategory="BACKGROUND">

</AbstractText>

<AbstractText Label="METHODS" NlmCategory="METHODS">

</AbstractText>

<AbstractText Label="RESULTS" NlmCategory="RESULTS">

</AbstractText>

<AbstractText Label="CONCLUSIONS" NlmCategory="CONCLUSIONS">

</AbstractText>

<CopyrightInformation>Copyright 2004 American Cancer Society.</CopyrightInformation>

</Abstract>

The part for this in the xsl looks like this:

<COL>

<DATA>

<xsl:for-each select="MedlineCitation/Article/Abstract">

<xsl:value-of select="AbstractText"/>

</xsl:for-each>

</DATA>

</COL>

However Filemaker only imports the first subset "Background". What do I have to do, to import all? (I want the entire text in one cell...)

Thanks in advance!

Link to comment
Share on other sites

there are no TEXT values to "AbstractText" only attribute values. If you want them imported, you need to point to them specifically:

<xsl:value-of select="AbstractText/@Label" />

<xsl:value-of select="AbstractText/@NlmCategory /> (if you want these values, too)

keep in mind that you will get all these jammed together in your for-each loop. You can add returns or space or comma+space:

<xsl:value-of select="AbstractText/@Label" /><xsl:text>, </xsl:text>

Beverly

Link to comment
Share on other sites

  • 4 years later...
On 7/27/2012 at 9:15 PM, beverly said:

there are no TEXT values to "AbstractText" only attribute values. If you want them imported, you need to point to them specifically:

 

<xsl:value-of select="AbstractText/@Label" />

<xsl:value-of select="AbstractText/@NlmCategory /> (if you want these values, too)

 

keep in mind that you will get all these jammed together in your for-each loop. You can add returns or space or comma+space:

<xsl:value-of select="AbstractText/@Label" /><xsl:text>, </xsl:text>

 

Beverly

Hi Beverly,

How would it be when there are multiple attributes within the subset?

Example:

-----------------

<PubmedArticleSet>

  <PubmedArticle>

    <PubmedData>

        <ArticleIdList>
            <ArticleId IdType="pubmed">27167443</ArticleId>
            <ArticleId IdType="pii">S1806-37132016000200162</ArticleId>
            <ArticleId IdType="doi">10.1590/S1806-37562016000000114</ArticleId>
            <ArticleId IdType="pmc">PMC4853075</ArticleId>
        </ArticleIdList>

    </PubmedData>
  </PubmedArticle>

</PubmedArticleSet>

-----------------

Regards,

Daniel

Link to comment
Share on other sites

This topic is 2666 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.