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 9242645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:37:23+00:00 2026-06-18T08:37:23+00:00

I have an Xml File as below: <?xml version=1.0 encoding=UTF-8 standalone=yes?> <ea:Stories ea:WWVersion=2.0 xmlns:aic=http://ns.adobe.com/AdobeInCopy/2.0

  • 0

I have an Xml File as below:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ea:Stories ea:WWVersion="2.0" xmlns:aic="http://ns.adobe.com/AdobeInCopy/2.0" xmlns:ea="urn:SmartConnection_v3">
<ea:Story ea:GUID="D8BEFD6C-AB31-4B0E-98BF-7348968795E1" pi0="style=&quot;50&quot; type=&quot;snippet&quot; readerVersion=&quot;6.0&quot; featureSet=&quot;257&quot; product=&quot;8.0(370)&quot; " pi1="SnippetType=&quot;InCopyInterchange&quot;">
<ea:StoryInfo>
<ea:SI_EL>headline</ea:SI_EL>
<ea:SI_Words>4</ea:SI_Words>
<ea:SI_Chars>20</ea:SI_Chars>
<ea:SI_Paras>1</ea:SI_Paras>
<ea:SI_Lines>1</ea:SI_Lines>
<ea:SI_Snippet>THIS IS THE HEADLINE</ea:SI_Snippet>
<ea:SI_Version>AB86A3CA-CEBC-49AA-A334-29641B95748D</ea:SI_Version>
</ea:StoryInfo>
</ea:Story>
</ea:Stories>

As you can see all elements have “ea:” which is a namespace prefix.

I’m writing an XSLT file to show the SI_Snippet text which is “THIS IS THE HEADLINE”.

How to write the xpath in the XSLT file? Should it contain the namespace or should it be excluded?

//ea:Story[ea:SI_EL='headline']/ea:SI_Snippet or 
//Story[SI_EL='headline']/SI_Snippet

Actually both fail in the online tool I used: http://xslt.online-toolz.com/tools/xslt-transformation.php

So there should be another way?

If later, how does it know which namespace to look at? Should I be passing the namespace to the XslTransformer at runtime?

  • 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-18T08:37:24+00:00Added an answer on June 18, 2026 at 8:37 am

    You should declare the namespace in your XSLT and then use the prefix that you give it:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:ea="urn:SmartConnection_v3">
        <xsl:template match="/">
           <xsl:value-of select="//ea:Story[ea:SI_EL='headline']/ea:SI_Snippet" />
        </xsl:template>
    
        <!-- ...  -->
    </xsl:stylesheet>
    

    Note the xmlns:ea="urn:SmartConnection_v3" in the root element. This is important.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a xsl file as below: -------Begin------ <?xml version=1.0 encoding=utf-8?> <xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform
I have a xml file as below: <?xml version=1.0 encoding=UTF-8 standalone=no?> <RULES> <RULE DESCRIPTION=
I have the following spring servlet-context.xml file: <?xml version=1.0 encoding=UTF-8?> <beans xmlns=http://www.springframework.org/schema/beans xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:mvc=http://www.springframework.org/schema/mvc
I have an xml file likes below. <?xml version=1.0 encoding=utf-8 ?> <Book> <Title>Title</Title> <Content>Content</Content>
I have defined a xml schema as below <?xml version=1.0 encoding=utf-8?> <xs:schema id=PacketTemplate targetNamespace=http://tempuri.org/PacketTemplate.xsd
I have xml file below: <?xml version=1.0 encoding=utf-8 ?> <?xml-stylesheet version=1.0 type=text/xml href=template.xsl ?>
I have got below xml format file called ResourceData.xml . <?xml version=1.0 encoding=utf-8 ?>
I have an xml file like this, <?xml version=1.0 encoding=utf-8 ?> <root> <FeaturedProductCategories> <FeaturedProductCategory>
I need to parse an XML like this: <?xml version='1.0' encoding='UTF-8' standalone='yes'?> <pictures> <pic>
I have a long xml file the content of the file are below: <?xml

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.