Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 14th, 2006, 11:26 AM
Registered User
Join Date: Sep 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT process XML problem in XMLSpy


I am trying to prcess a xml file with xslt.

XML file:
<?xml version="1.0" encoding="UTF-8"?>

  <context id="C1">
      <identifier scheme="http://www.bedrijfX.nl/bus">cbs-bus</identifier>

  <context id="c2">
      <identifier scheme="http://www.bedrijfX.nl/bus">cbs-bus</identifier>

  <unit id="u1">


XSLT file
<?xml version="1.0" encoding="UTF-8"?>
<?altova_samplexml test.xml?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

    <xsl:template match="/">
                <title>Contexten en units validatie</title>

    <xsl:template match="xbrl">
                <xsl:apply-templates select="context"/>

    <xsl:template match="context">
            <td><xsl:value-of select="@id"/></td>
            <td><xsl:value-of select="entity/identifier"/></td>
            <td><xsl:value-of select="entity/identifier/@scheme"/></td>


The xml file has quite lots of name spaces. I cannot get the right result back by using this xslt to process the xml above. But if I remove the name spaces from the tag <xbrl>, then it does work.

Anybody can give a hint? Thanks.

Reply With Quote
  #2 (permalink)  
Old September 14th, 2006, 11:35 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

please Google for

"XSLT FAQ default namespace"

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #3 (permalink)  
Old September 14th, 2006, 11:53 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts



Joe (Microsoft MVP - XML)
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XMLSpy: copy data from excel, paste in XMLSpy 2004 xmler XML 1 November 26th, 2008 03:33 AM
Error in Xmlspy when running xslt script jastao XSLT 2 June 9th, 2008 04:11 PM
XML to XML with xslt problem bertvanpet XSLT 1 July 5th, 2007 06:25 AM
problem transforming XML using xslt micky3248 XSLT 7 August 18th, 2006 03:52 AM
xml and xslt problem astroflake XSLT 1 April 13th, 2004 06:09 AM

All times are GMT -4. The time now is 10:04 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.