473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

question on preserving embedded XHTML through XSLT of an XML document

I have a specific but somewhat high-level question on how to approach a
schema which embeds a subset of XHTML in some elements.

I have a schema defined for a logical document structure. Sections of
this document can contain presentation text; the schema allows a subset
of XHTML for these sections. All of this works fine as far as XML
schema validation etc.

I have an XSL transformation defined to convert my xml document to
XHTML. Here the containing and structuring XML elements are converted
to document sections with a TOC, internal anchors, etc. In this case I
want the "embedded" XHTML sections to be simply copied verbatim to the
output, i.e. not explicitly parsed or transformed. I can't seem to
succeed in doing this - is there a way? Or a preferable approach?

TIA,
Chris

Nov 27 '06 #1
2 1368
chriscorbell wrote:
want the "embedded" XHTML sections to be simply copied verbatim to the
output, i.e. not explicitly parsed or transformed.
XSLT won't "copy verbatim" without parsing -- but you could certainly do
an xsl:copy-of on the XHTML subtree to copy it through essentially
unchanged, or just let those elements be handled by an identity template.

It's hard to give a more explicit example without knowing exacty what
your input looks like.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Nov 27 '06 #2
I can't seem to succeed in doing this - is there a way?

Can you construct a small example? It's hard to guess
what it is exactly that's failing to do what you want.
There's no a priori reason you can't copy your XHTML
over *structurally* verbatim (parsed and re-emitted
in a functionally identical form).
Or a preferable approach?
Hard to guess the complexities of your exact situation
and goals. In general, however, I would become
anxious upon seeing XHTML presentation elements
mixed in with more "pure" XML content. Have you
considered a more complete separation of content
and presentation, such as a completely separate
XHTML "style" document, that contains placeholders
where your XML->XHTML transformed pure content
can be inserted?

Ron Burk
www.xmlator.com

Nov 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sven Steinacker | last post by:
Hi, XSLT files generated by Microsoft InfoPath applied to an applicable XML file produces quite decent HTML presentations. At least with Mozilla and, of course, IE 6.0 the results look the same...
0
by: Ray Pendergraph | last post by:
I am a developer but not used to UI/HTML stuff. I know this is not specifically an XHTML group but I just need some usage help. I want to populate XHTML text documents real time and have the values...
4
by: Luke Dalessandro | last post by:
I have some XML data that has mixed content XML tags that embed XHTML tags, for instance: <note>Somebody wrote this note in XHTML and wanto to <a href="link.html" target="_new">link</a> to a...
6
by: mike | last post by:
regards: Is it possible to use java XML api to translate a HTML document into a XHTML document(mobile profile) thank you best wishes
23
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
12
by: Pierre Senellart | last post by:
I am going to teach a basic Web design course (fundamentals of HTML/CSS, plus some basic client-side (JavaScript) and server-side (PHP, perhaps XSLT) scripting). Most of the students do not have...
3
by: Grant Harmeyer | last post by:
I have an XSL file that is being applied to an RSS feed, and it works great except for 2 things: 1.) XSL doesn't close the <img> tag for xhtml even though I have it being closed in the XSL file...
9
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP...
15
by: Zhang Weiwu | last post by:
http://www.w3.org/MarkUp/2004/xhtml-faq provided a trick to serve xhtml webpage to IE as application/xml I used that trick and now every one of my xhtml webpage have following first 4 starting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.