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

  • SEARCH
  • Home
  • 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 8606353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:04:30+00:00 2026-06-12T03:04:30+00:00

I am currently doing XML and XSLT and I have a question I have

  • 0

I am currently doing XML and XSLT and I have a question

I have done everything and validates fine but does not give me the right answer. One solution that worked fine was using CDATA but I want to use the xmlns=”http://www.w3.org/xhtml.

here is my relevant code

XML Schema

        <xs:element name="bb">
            <xs:complexType mixed="true">
                <xs:sequence>
                    <xs:any namespace="http://www.w3.org/1999/xhtml"
                            minOccurs="0"
                            maxOccurs="unbounded" 
                            processContents="skip"/>
                </xs:sequence>          
            </xs:complexType>
        </xs:element>

XSLT

<xsl:template match="xsi:bb">
    <div style="font-family:calibri;font-size:16">
        <span style="color:#000"> 
            Babo is: 
        </span> 
        <xsl:value-of select="." disable-output-escaping="yes"/>
    </div>
</xsl:template>

XML

<bb>
    <li xmlns="http://www.w3.org/1999/xhtml"> 
        hoby
    </li> 

    <li xmlns="http://www.w3.org/1999/xhtml"> 
        the best
    </li> 
</bb>

According to my theory it should return (when I convert XML to HTML)

  • hoby
  • the best
  • but it is just returning hoby the best.

    Why?

    • 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-12T03:04:31+00:00Added an answer on June 12, 2026 at 3:04 am

      I think you need apply templates on li elements. xsl:value-of run for a subtree will read and concatenate all text nodes. AFAIR (may be wrong – you may want to double check this) disable output escaping is used for the content of the text node and not for elements text nodes belong too. The reason is that the li elements (in your case) are seperate elements in the tree and are internally treated as such and not as elements. If you want just to copy li elements as is you can just use something like this:

      <xsl:copy-of select="xhtml:li" xmlns:xhtml="http://www.w3.org/1999/xhtml"/>
      

      (or if you want to copy all elements:

      <xsl:copy-of select="*" />
      

      )

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

    Sidebar

    Related Questions

    So currently I'm doing some XML-> XSLT-> (HTML5/CSS3) work. Right now I have a
    I have the following line of xml that I'm trying transform using XSLT but
    im doing a quick update for a site but xslt is not my thing
    I'm currently doing facebook integration and have gone through this tutorial . So far,
    I am currently doing a project in which I have to request data from
    I'm currently doing the following to compensate for boolean's not mapping well to radio
    I am currently doing a C# WPF application that generates a table that does
    I have some XML like this: <root> <do-not-sort> <z/> <y/> </do-not-sort> <sortable> <e f=fog
    Currently I have some legacy ASP.NET 2.0 code that uses the ASP Xml web
    I have an xml file and an xslt file. The xml file has a

    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.