Search found 89 matches

by jkmyoung
Fri Jul 13, 2007 8:52 pm
Forum: XSLT and FOP
Topic: XSL - FOP Incrementing A Number
Replies: 1
Views: 2576

You might be able to accomplish what you're trying to do with <xsl:number>
would have to see more of the code and source xml to be any help.

xsl isn't designed to be programmatic
by jkmyoung
Fri Jul 13, 2007 8:48 pm
Forum: XSLT and FOP
Topic: XSLT help
Replies: 5
Views: 3852

12-01-2004T12:00:00 to only 12-01-2004
<xsl:value-of select="substring-before(., 'T')"/>
by jkmyoung
Thu Jul 12, 2007 6:12 pm
Forum: XSLT and FOP
Topic: XSLT help
Replies: 5
Views: 3852

<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:key name="Names" match="Name" use="."/> <xsl:templa...
by jkmyoung
Tue Jul 03, 2007 5:15 pm
Forum: XSLT and FOP
Topic: xml, xsl and ajax
Replies: 1
Views: 3076

getElementById("medicalid") This implies you're getting an element like so: <element id="medicalid"> I think you need to find a medical element where medical_field_id="PS" instead. Either change your source to use id attributes, or use getElementsByTagName("medical...
by jkmyoung
Mon Jun 25, 2007 5:24 pm
Forum: XSLT and FOP
Topic: xsl copy xml but move 1 field value to another
Replies: 1
Views: 3140

You can create 2 templates for the specified username nodes like so: <xsl:template match="userdetails/username"> <xsl:copy/> <!-- remove inside text --> </xsl:template> <xsl:template match="requestdetails/username"> <xsl:copy> <xsl:value-of select="//userdetails/username&quo...
by jkmyoung
Mon Jun 25, 2007 5:16 pm
Forum: General XML Questions
Topic: Sum and Count Together
Replies: 10
Views: 12704

Then afterwards, just use
<xsl:value-of select="//ACT"/>
or
<xsl:value-of select="SCHED//ACT"/>
by jkmyoung
Mon Jun 25, 2007 5:14 pm
Forum: General XML Questions
Topic: Sum and Count Together
Replies: 10
Views: 12704

Inside a SCHED context, eg, a <xsl:for-each select="SCHED"> or a <xsl:template match="SCHED">

<xsl:value-of select="count(ASSGN/ACT)"/>
by jkmyoung
Tue Jun 05, 2007 5:36 pm
Forum: XSLT and FOP
Topic: Help with Transformation
Replies: 1
Views: 3374

<xsl:value-of select="count(//Flow[@From = $From])"/>

where $From is a parameter.
by jkmyoung
Tue Jun 05, 2007 5:28 pm
Forum: XSLT and FOP
Topic: Help with a transform
Replies: 2
Views: 3627

4 things here: 1. Key to match rows by parent. 2. Copy template for most nodes. 3. Seperate template for rs:data, so we can apply templates only to the top level rows. 4. Use of key in the z:row template The key is not necessary, but will speed things up if you have a lot of rows. <?xml version=&quo...
by jkmyoung
Tue May 22, 2007 11:27 pm
Forum: XSLT and FOP
Topic: Using XSL to filter an XML document
Replies: 1
Views: 3639

We'd need to see the rest of the javascript. Generally you'd pass in a parameter into the xslt, set up like: <xsl:stylesheet .... > <xsl:param name="start" select=""/> and then change your for-each loop to <xsl:for-each select="occupations/occupation[starts-with(description,...
by jkmyoung
Fri May 11, 2007 11:22 pm
Forum: General XML Questions
Topic: Merging of two xml files
Replies: 1
Views: 4762

Could you post the section of code where you are getting errors?
by jkmyoung
Fri Nov 24, 2006 12:30 am
Forum: XSLT and FOP
Topic: Sort Question.
Replies: 3
Views: 5045

Not exactly sure if this is what you want.

<xsl:apply-templates select="//makeEdit | //make | //guardMake">
<xsl:sort select="@value"/>
</xsl:apply-templates>
by jkmyoung
Tue Nov 14, 2006 6:42 pm
Forum: XSLT and FOP
Topic: xml tree to flat xml
Replies: 2
Views: 4479

<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="*"> <xsl:copy/> <xsl:apply-templates/> </xsl:template> ...
by jkmyoung
Thu Nov 09, 2006 10:12 pm
Forum: XSLT and FOP
Topic: remove include
Replies: 1
Views: 4124

<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="include"> <xsl:copy-of select="document(@file)//*[...
by jkmyoung
Thu Sep 14, 2006 5:39 pm
Forum: XSLT and FOP
Topic: xalan:evaluate compile problem
Replies: 3
Views: 5642

instead, can you use:
dyn:evaluate
xmlns:dyn="http://exslt.org/dynamic"
?

Sorry I'm not of more help.
by jkmyoung
Thu Sep 14, 2006 5:35 pm
Forum: XSLT and FOP
Topic: Need help with a transform
Replies: 6
Views: 6852

First, stop using /*/xml everywhere,-> this implies that you're using a xml node which is not the root (unless your input file is different than posted.) Second, unless you have multiple z:row 's in your xml in other locations, you can simply use z:row as the template match string. <xsl:template mat...
by jkmyoung
Fri Aug 11, 2006 12:29 am
Forum: XSLT and FOP
Topic: XSLT problem
Replies: 6
Views: 6801

/*/*[2]

Does this xpath work?
by jkmyoung
Wed Jul 26, 2006 11:15 pm
Forum: XSLT and FOP
Topic: Can you embed xsl style sheets in xml documents
Replies: 3
Views: 6778

It looks like the best solution for you is to post the xsl stylesheet to a globally available location.

If this same xml file is viewed many times, you might consider transforming the xml on the server itself before showing it to the user. Then the user only needs one access.
by jkmyoung
Tue Jun 20, 2006 6:31 pm
Forum: XSLT and FOP
Topic: XSL if-expression question
Replies: 4
Views: 6754

You could always do:
<xsl:variable name="qd">
<xsl:choose>
<xsl:when test="if(value/qDisplay/text() eq '')>empty</xsl:when>
<xsl:otherwise>right</xsl:otherwise>
</xsl:choose>
</xsl:variable>
by jkmyoung
Mon May 01, 2006 5:26 pm
Forum: XSLT and FOP
Topic: reading values from a topic map...
Replies: 1
Views: 3931

Are you actually applying the template to this topicref node?
as in <xsl:apply-templates select="//topicref"/>
by jkmyoung
Thu Apr 06, 2006 9:29 pm
Forum: XSLT and FOP
Topic: Having problems creating a xsl:when condition
Replies: 3
Views: 5610

Entire condition should be in the brackets.. otherwise you're only taking one node, comparing to copiedItemRecKey, and then trying to count if it matched or not. moved the ']' <xsl:when test="(not(normalize-space(copiedItemRecKey) = '')) and (count(/SendRfqDto/scenariosToBeShopped//SpecialInqui...
by jkmyoung
Thu Mar 23, 2006 6:19 pm
Forum: XSLT and FOP
Topic: Price an XML file
Replies: 5
Views: 6584

Actually even more compact: This one represents more of what you're trying to do, copying everything, and editing only the Price. (wish they had edit post capability here) <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform&...
by jkmyoung
Thu Mar 23, 2006 6:14 pm
Forum: XSLT and FOP
Topic: Price an XML file
Replies: 5
Views: 6584

<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output indent="yes"/> <xsl:template match="Root|Page|Story|Table"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </...
by jkmyoung
Thu Mar 23, 2006 6:03 pm
Forum: XSLT and FOP
Topic: Price an XML file
Replies: 5
Views: 6584

If it's always in the first cell in the row you could change to: <xsl:variable name="var" select="Cell/SKU[1]"/> If not always in the first cell in the row: <xsl:variable name="var" select="(Cell/SKU)[1]"/> Also in the corresponding price var I recommend using...
by jkmyoung
Tue Mar 21, 2006 5:32 pm
Forum: General XML Questions
Topic: empty namespace
Replies: 4
Views: 9765

An element automatically falls under the same namespace as it's parent unless stated otherwise by declaring a different namespace. Additionally, if you wanted all elements in your output to have the same namespace you could move the xmlns attribute to your xsl:stylesheet element, eg. <xsl:stylesheet...
by jkmyoung
Wed Mar 08, 2006 1:01 am
Forum: XSLT and FOP
Topic: Newbie in XSLT need help
Replies: 6
Views: 5700

Just as a clarification You're using: <xsl:if test="not(@name=following::grp/@name)"> Which means if this is the last grp node in the FILE that has this name. Did you want the last node in the file, or did you want the first node, or maybe just the last node in this user? You may want (for...
by jkmyoung
Mon Mar 06, 2006 10:50 pm
Forum: XML Schemas
Topic: Validation XML agaist XSD
Replies: 2
Views: 10237

You need to declare your namespaces in your xml file eg. <mh:MessageHeader> the xml has no idea what mh: represents. same with sn: eg you have in your schema file. xmlns:mh="http://mydomain.com/Namespaces/Container/Public/MessageHeader.xsd" xmlns:sn="http://mydomain.com/Namespaces/Con...
by jkmyoung
Mon Mar 06, 2006 10:28 pm
Forum: General XML Questions
Topic: Berkley DBXML 2.13 violates own rules
Replies: 2
Views: 8647

That sounds like they have started using a stricter format for URI.
Try using forward slashes / instead of backslashes \

I had the same problem when I went from Saxon 6 to Saxon 8 a couple years ago.
by jkmyoung
Mon Mar 06, 2006 10:18 pm
Forum: General XML Questions
Topic: count with xpath
Replies: 1
Views: 7196

<xsl:template match="tocount">
<xsl:value-of select="1+count(preceding::tocount)"/>
</xsl:template>