Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Using One XSLT and multiple XML Problem (One is XML and another one is XBRL)

Reply
Thread Tools

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

 
 
loveNUNO
Guest
Posts: n/a
 
      11-20-2003
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"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:link="http://www.xbrl.org/2001/XLink/xbrllinkbase"
xmlnslink="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 -->
<aXinfoARAMETER-INFO>
<aXinfoaram name="companyCD" value="50925"/>
.....
</aXinfoARAMETER-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?
 
Reply With Quote
 
 
 
 
Dimitre Novatchev
Guest
Posts: n/a
 
      11-20-2003
> 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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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"
> xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:link="http://www.xbrl.org/2001/XLink/xbrllinkbase"
> xmlnslink="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 -->
> <aXinfoARAMETER-INFO>
> <aXinfoaram name="companyCD" value="50925"/>
> .....
> </aXinfoARAMETER-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?



 
Reply With Quote
 
 
 
 
loveNUNO
Guest
Posts: n/a
 
      11-20-2003
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 ~~


http://www.velocityreviews.com/forums/(E-Mail Removed) (loveNUNO) wrote in message news:<(E-Mail Removed). com>...
> 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"
> xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:link="http://www.xbrl.org/2001/XLink/xbrllinkbase"
> xmlnslink="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 -->
> <aXinfoARAMETER-INFO>
> <aXinfoaram name="companyCD" value="50925"/>
> .....
> </aXinfoARAMETER-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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML to another XML format transformation using XSLT Binaryx XML 3 04-14-2012 10:20 PM
XSLT question: How to lookup another tag's children in XSLT yinglcs@gmail.com XML 18 10-03-2006 11:22 PM
Problem to insert an XML-element by XSLT-converting from one XML-file into another XML-file jkflens XML 2 05-30-2006 09:41 AM
Multiple XSLT Transforms using a Controller XSLT sneill@mxlogic.com XML 2 10-19-2005 11:00 AM
Using multiple XML/XSLT engines simultaneously in one server Sebastian Millies Java 0 03-09-2005 10:43 AM



Advertisments