General discussion

Locked

XML Forum

By Mark W. Kaelin Editor ·
Welcome to the XML Forum. This is the place to post your XML questions, share your best techniques, and express your opinion on topics that impact IT development.

We also encourage you to post your comments about the XML TechMail.

If you haven't subscribed to the XML TechMail, there is no better time to take advantage of our free e-newsletter. Visit our e-newsletter subscription center to subscribe to this valuable TechMail today:

http://builder.com.com/techmails.jhtml?repID=u001

This conversation is currently closed to new comments.

31 total posts (Page 2 of 4)   Prev   01 | 02 | 03 | 04   Next
Thread display: Collapse - | Expand +

All Comments

Collapse -

57

by teste In reply to xml to pdf conversion
Collapse -

58

by teste In reply to xml to pdf conversion
Collapse -

59

by teste In reply to xml to pdf conversion
Collapse -

510

by teste In reply to xml to pdf conversion

sad sad asd asdas

Collapse -

511

by teste In reply to xml to pdf conversion
Collapse -

stylesheet

by kevin In reply to proper forum?

Does anyone have a simple stylesheet that makes all the elements in a fairly multi-level xml file become children of the root node?

Collapse -

stylesheet transform

by MCarlson In reply to stylesheet

Your request to move all elements to the root node, means that there will be no root element for the transformed XML. Here's the XSL that transforms XML documents (w/o namespaces) to what you requested...

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!--transform all elements
to children of root node-->

<!--I omitted the XML declaration in the result
since the result is not well-formed XML-->
<xsl:output method="xml"
omit-xml-declaration="yes"/>

<!--match root & element nodes-->
<xsl:template match="/|*">
<!--copy child element nodes along with it's
attributes & text nodes, but not it's
nested elements-->
<xsl:for-each select="*">
<xsl:copy>
<xsl:apply-templates
select="text()|@*"/>
</xsl:copy>
</xsl:for-each>
<!--process child elements-->
<xsl:apply-templates select="*"/>
</xsl:template>

<xsl:template match="@*|text()">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

Collapse -

missing data

by kevin In reply to proper forum?

I am using a stylesheet to convert xml to html. It calls for a repeating element to display in a certain typestyle and font within an html table. The first element appears just fine, however all the others are missing. IE leaves a gap of white spacewhere the element should appear, but it does not. They all seem to be there until I begin to scroll. Does anyone know what might cause this?

Collapse -

repeating element?

by zitts In reply to missing data

I don't understand what you mean by that. Are you using recursion or placing it in the output with a value-of element? What is in the output file where you expect the elements?

Collapse -

by kevin In reply to repeating element?

I am using a for-each that points to a template with apply-templates to find the elements and place them in an html table, which it does correctly. In the template I am using a value-of, inside a html heading tag. The first element shows up in IE asdo the others, however, when I begin to scroll, only the first element remains the others are gone with only the white background space of the table cell showing

Back to Web Development Forum
31 total posts (Page 2 of 4)   Prev   01 | 02 | 03 | 04   Next

Related Discussions

Related Forums