Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8856317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:19:45+00:00 2026-06-14T14:19:45+00:00

I have an xml <?xml version=1.0?> <ArrayOfSubscriber xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema> <Subscriber> <FirstName xsi:nil=true xmlns=somenamespace />

  • 0

I have an xml

<?xml version="1.0"?>
    <ArrayOfSubscriber xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Subscriber>
        <FirstName xsi:nil="true" xmlns="somenamespace" />
        <LastName xsi:nil="true" xmlns="somenamespace" />
        ...
      </Subscriber>
...
</ArrayOfSubscriber>

I need to create an excel file where each column has its own style. I hoped to get what I expected using the next transformation

<Worksheet>
  <Table>
    <xsl:apply-templates select="//Subscriber" />
  </Table>
</Worksheet>

<xsl:template match="Subscriber">
  <Row ss:Height="15">
    <Cell ss:StyleID="s21">
      <Data ss:Type="String">
        <xsl:value-of select="FirstName" />
      </Data>
    </Cell>
    <Cell ss:StyleID="s22">
      <Data ss:Type="String">
        <xsl:value-of select="LastName " />
      </Data>
    </Cell>
    ...
   </Row>
</xsl:template>

But the problem appears because of namespaces xmlns="somenamespace". Thus I can’t get the data. I found a few topics where the possibility of removing them was described but as far as I new to xslt I didn’t succeed in applying the right template to my task.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:19:47+00:00Added an answer on June 14, 2026 at 2:19 pm

    Try the alternative in the post I linked to earlier using a construct similar to this one:

    <xsl:value-of select="*[local-name()='FirstName' = and namespace-uri()='somenamespace']" />
    

    Previously suggested to define the namespace a parent element:

    <parent xmlns:sn="somenamespace">
    ...
    <xsl:template match="Subscriber">
      <Row ss:Height="15">
        <Cell ss:StyleID="s21">
          <Data ss:Type="String">
            <xsl:value-of select="sn:FirstName" />
          </Data>
        </Cell>
        <Cell ss:StyleID="s22">
          <Data ss:Type="String">
            <xsl:value-of select="sn:LastName " />
          </Data>
        </Cell>
        ...
       </Row>
    </xsl:template>
    ...
    </parent>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following XML Document: <?xml version=\1.0\ encoding=\UTF-8\?> <atom:entry xmlns:atom=\http://www.w3.org/2005/Atom\ xmlns:apps=\http://schemas.google.com/apps/2006\ xmlns:gd=\http://schemas.google.com/g/2005\> <apps:property
I have this XML at http://localhost/file.xml : <?xml version=1.0 encoding=utf-8?> <val:Root xmlns:val=http://www.hw-group.com/XMLSchema/ste/values.xsd> <Agent> <Version>2.0.3</Version>
I have an XML document being sent to me by HTTP POST: <?xml version=1.0
I have an xml and xsd file that both validate correctly (tested at http://xsdvalidation.utilities-online.info/
I have an XML attribute representing the version numbering of a file. The file
I have the following XML <?xml version=1.0 encoding=ISO-8859-1 ?> - <DEVICEMESSAGES> <VERSION xml=1 checksum=
I have a maven dependency in my pom.xml as such: <dependency> <groupId>com.foo</groupId> <artifactId>Bar</artifactId> <version>1.2.3</version>
I am trying to transform an XML file into an updated version. I have
Currently, I have this version of the autocomplete control working when returning XML from
I have an XML file that looks like <?xml version='1.0' encoding='UTF-8'?> <root> <node name=foo1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.