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

L

loveNUNO

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?
 
D

Dimitre Novatchev

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
 
L

loveNUNO

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 ~~
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top