Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 14th, 2006, 11:26 AM
Registered User
Join Date: Sep 2006
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.

Old September 14th, 2006, 11:35 AM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
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
Old September 14th, 2006, 11:53 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts



Joe (Microsoft MVP - XML)

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

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