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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:30:31+00:00 2026-06-07T13:30:31+00:00

Background Converting a document from OpenOffice to DocBook format. Problem Parts of the document

  • 0

Background

Converting a document from OpenOffice to DocBook format.

Problem

Parts of the document include the following:

<ul><li><ul><li><ul><li><p>...</p></li></ul></li></ul></li></ul>

While other parts of the document include:

<ul><li><p>...</p></li></ul>

I tried to match just the inner-most ul tag using:

<xsl:template match="xhtml:ul[not(child::xhtml:li/child::xhtml:ul)]">
...
</xsl:template>

But this does not match. The following expression:

<xsl:template match="xhtml:ul">

Will create, as expected:

<itemizedlist>
<itemizedlist>
<itemizedlist>
...
</itemizedlist>
</itemizedlist>
</itemizedlist>

Desired Output

The desired output format, regardless of ul nesting, is:

<itemizedlist>
...
</itemizedlist>

Question

What’s the correct syntax for matching the innermost child ul node?

Ideas

There are a few ways to resolve this:

  • Search/replace the original document (there are only ~20 instances).
  • Use xsl:test within the li node to see if the child node is ul.

What XPath expression would work? For example:

<xsl:template match="xhtml:ul[not(grandchild::xhtml:ul)]">

Thank you!

  • 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-07T13:30:32+00:00Added an answer on June 7, 2026 at 1:30 pm
    <xsl:template match="xhtml:ul[not(descendant::xhtml:ul)]">
      <itemizedlist><xsl:apply-templates /></itemizedlist>
    </xsl:template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background Converting from using .Net Remoting to WCF. Most of the methods on the
I am from a c# background and am converting a vb.net windows forms app
Background: I've been tasked with converting an Access database application to ASP.Net C# MVC.
I come from a Visual Basic background (a long time ago), so be gentle
I want to pass a custom made vector object containing data from background service
Background: Every work day I get an e-mail from a vendor who sends me
Problem Background I'm building a custom WCF Data Service provider using the Alex James
I've been struggling for a while now trying to add a good looking background
I have a long operation running in the background, like uploading stuff, converting images,
I have an image.png with white background and some trasparceny over it. I tried

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.