Using One XSLT and multiple XML Problem (One is XML and another one is XBRL)

Discussion in 'XML' started by loveNUNO, Nov 20, 2003.

  1. loveNUNO

    loveNUNO Guest

    Hi ~
    Plz Help me ~~

    My problem is..

    XBRL Sample file
    ------------------
    a.xbrl

    <?xml version="1.0" encoding="utf-8"?>

    <group xmlns="http://www.xbrl.org/2001/instance"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:link="http://www.xbrl.org/2001/XLink/xbrllinkbase"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:ISO4217="http://www.iso.org/4217"
    xmlns:aXinfo="http://www.love.com"
    xmlns:kkw="http://www.love.com/xbrl/taxonomy"
    xsi:schemaLocation="http://www.love.com/xbrl/taxonomy kkw.xsd">
    <!-- PARAMETER INFO -->
    <aXinfo:pARAMETER-INFO>
    <aXinfo:param name="companyCD" value="50925"/>
    .....
    </aXinfo:pARAMETER-INFO>

    <!-- ELEMENTS -->
    <kkw:CRP_NM nonNumericContext="nonNumC1">cyber</kkw:CRP_NM>
    <kkw:RSP_DPT nonNumericContext="nonNumC1">300</kkw:RSP_DPT>
    .....
    </group>
    -----------------------

    and xml sample
    -----------------------
    a.xml

    <?xml version="1.0" encoding="utf-8"?>
    <?xml-stylesheet type="text/xsl" href="xbrl.xsl"?>
    <DOCUMENT EID="1">
    .....
    </DOCUMENT EID="1">
    -----------------------

    XSLT transform a.xml.

    I used document() function.

    ====> <xsl:value-of select="document(a.xbrl')/group/kkw:CRP_NM" />

    But it is not working.


    How get I a.xbrl 's element?
    loveNUNO, Nov 20, 2003
    #1
    1. Advertising

  2. > XSLT transform a.xml.
    >
    > I used document() function.
    >
    > ====> <xsl:value-of select="document(a.xbrl')/group/kkw:CRP_NM" />
    >
    > But it is not working.


    There is no "group" element in a.xbrl belonging to no namespace. The "group"
    element there belongs to the "http://www.xbrl.org/2001/instance" namespace.

    Therefore, the above XPath expression must be corrected -- e.g. to:

    document(a.xbrl')/xbrl:group/kkw:CRP_NM

    and in your stylesheet you must have declared the xbrl namespace, binding
    the xbrl prefix to "http://www.xbrl.org/2001/instance"


    =====
    Cheers,

    Dimitre Novatchev.
    http://fxsl.sourceforge.net/ -- the home of FXSL




    "loveNUNO" <> wrote in message
    news:...
    > Hi ~
    > Plz Help me ~~
    >
    > My problem is..
    >
    > XBRL Sample file
    > ------------------
    > a.xbrl
    >
    > <?xml version="1.0" encoding="utf-8"?>
    >
    > <group xmlns="http://www.xbrl.org/2001/instance"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xmlns:link="http://www.xbrl.org/2001/XLink/xbrllinkbase"
    > xmlns:xlink="http://www.w3.org/1999/xlink"
    > xmlns:ISO4217="http://www.iso.org/4217"
    > xmlns:aXinfo="http://www.love.com"
    > xmlns:kkw="http://www.love.com/xbrl/taxonomy"
    > xsi:schemaLocation="http://www.love.com/xbrl/taxonomy kkw.xsd">
    > <!-- PARAMETER INFO -->
    > <aXinfo:pARAMETER-INFO>
    > <aXinfo:param name="companyCD" value="50925"/>
    > .....
    > </aXinfo:pARAMETER-INFO>
    >
    > <!-- ELEMENTS -->
    > <kkw:CRP_NM nonNumericContext="nonNumC1">cyber</kkw:CRP_NM>
    > <kkw:RSP_DPT nonNumericContext="nonNumC1">300</kkw:RSP_DPT>
    > .....
    > </group>
    > -----------------------
    >
    > and xml sample
    > -----------------------
    > a.xml
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <?xml-stylesheet type="text/xsl" href="xbrl.xsl"?>
    > <DOCUMENT EID="1">
    > ....
    > </DOCUMENT EID="1">
    > -----------------------
    >
    > XSLT transform a.xml.
    >
    > I used document() function.
    >
    > ====> <xsl:value-of select="document(a.xbrl')/group/kkw:CRP_NM" />
    >
    > But it is not working.
    >
    >
    > How get I a.xbrl 's element?
    Dimitre Novatchev, Nov 20, 2003
    #2
    1. Advertising

  3. loveNUNO

    loveNUNO Guest

    Re: I'd solve this question my self

    Using Namespace..

    for example,

    write this in XSLT File

    xmlns:dummy="http://www.xbrl.org/2001/instance"

    and

    using this way

    <xsl:variable name="xbrlFILE" select="document('a.xbrl')" />
    <xsl:value-of select="$xbrlFILE/dummy:gruop/kkw:CRP_NM" />


    CARPE DIEM ~~


    (loveNUNO) wrote in message news:<>...
    > Hi ~
    > Plz Help me ~~
    >
    > My problem is..
    >
    > XBRL Sample file
    > ------------------
    > a.xbrl
    >
    > <?xml version="1.0" encoding="utf-8"?>
    >
    > <group xmlns="http://www.xbrl.org/2001/instance"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xmlns:link="http://www.xbrl.org/2001/XLink/xbrllinkbase"
    > xmlns:xlink="http://www.w3.org/1999/xlink"
    > xmlns:ISO4217="http://www.iso.org/4217"
    > xmlns:aXinfo="http://www.love.com"
    > xmlns:kkw="http://www.love.com/xbrl/taxonomy"
    > xsi:schemaLocation="http://www.love.com/xbrl/taxonomy kkw.xsd">
    > <!-- PARAMETER INFO -->
    > <aXinfo:pARAMETER-INFO>
    > <aXinfo:param name="companyCD" value="50925"/>
    > .....
    > </aXinfo:pARAMETER-INFO>
    >
    > <!-- ELEMENTS -->
    > <kkw:CRP_NM nonNumericContext="nonNumC1">cyber</kkw:CRP_NM>
    > <kkw:RSP_DPT nonNumericContext="nonNumC1">300</kkw:RSP_DPT>
    > .....
    > </group>
    > -----------------------
    >
    > and xml sample
    > -----------------------
    > a.xml
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <?xml-stylesheet type="text/xsl" href="xbrl.xsl"?>
    > <DOCUMENT EID="1">
    > ....
    > </DOCUMENT EID="1">
    > -----------------------
    >
    > XSLT transform a.xml.
    >
    > I used document() function.
    >
    > ====> <xsl:value-of select="document(a.xbrl')/group/kkw:CRP_NM" />
    >
    > But it is not working.
    >
    >
    > How get I a.xbrl 's element?
    loveNUNO, Nov 20, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rushi

    How to work with XBRL?

    rushi, Feb 11, 2005, in forum: XML
    Replies:
    1
    Views:
    995
    XBRL Guru
    Mar 28, 2005
  2. Replies:
    2
    Views:
    704
    Henry S. Thompson
    Oct 19, 2005
  3. jkflens
    Replies:
    2
    Views:
    1,444
    jkflens
    May 30, 2006
  4. Greg
    Replies:
    1
    Views:
    820
    XBRL Guru
    Jun 10, 2006
  5. JemmimmaP

    Creating an XBRL compliant document

    JemmimmaP, Sep 9, 2010, in forum: ASP .Net
    Replies:
    5
    Views:
    1,470
    WhatIThink
    Sep 16, 2010
Loading...

Share This Page