|
In
format-number(".//AmountPaid","#.00")
remove the quotes around .//AmountPaid - with quotes, it won't get interpreted as an XPath expression,rather as a string
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
can anyone tell me how to append xsl output to a file which already has some lines of data.
the quieter u become more u hear
|
|
|
|
|
Get your XSL processor to output to a string and append the string to the existing file
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
XML Schema-
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com"
elementFormDefault="qualified">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XML referencing XML Schema-
<?xml version="1.0"?>
<note xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="note.xsd">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
I want to know if in xml file I use xsi:noNamespaceSchemaLocation attribute then what elements or attributes should remove from xml schema.
Also please explain
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com"
elementFormDefault="qualified"
in xml schema.
Thanks in adv.
|
|
|
|
|
Dear All,
I am facing a problem while using XSLT. My requiremnt is to read an "**.ini" file and display based on the XML value. But the problem is I am not able to get the path of "*.ini" file dynamically.
I tried Window.location of Javascript. But unfortunatly the javascript is not being "processed" by the XSLT.
<msxsl:script xmlns:msxsl="urn:schemas-microsoft-com:xslt" language="JavaScript" implements-prefix="dx">
<![CDATA[
function GetRecordFolder()
{
var paths = window.location.pathname;
…….
…….
}
]]>
Any other suggestions to solve this problem?
Regards,
Rathish P S
|
|
|
|
|
hi to all,
Is there any tool which validate or check an ODX xml file whether it is according to ASAM standard or not.
Plz suggest if anybody know..
Thanks in adv..
|
|
|
|
|
Hello to all,
I have already created this post before in C# section, but I am not able to solve that problem.Thats why I am again raising the same question.
Problem is , when I deserialize a valid xml with xsi:type attribute, it i.e. deserialization fails occurs.
Plz let me to know how this deserialization will process in C#.
Thanks in adv..
|
|
|
|
|
guys how to set global variable in xsl using javascript
and also tell me is there any get method and set method in xsl for declaring global variables and getting them back
the quieter u become more u hear
|
|
|
|
|
<tracerData>
<tracerBrand>Unknown</tracerBrand>
<tracerType>Weco 3DFT+</tracerType>
<tracerVersion>?</tracerVersion>
<binaries format="OMA">1C414E533D3030310D4A4F423D223F220D5354415455533D300D545243464D543D333B313030303B453B523B440D523D911B891B831B841B841B831B851B841B851B841B851B851B851B841B841B851B841B851B851B851B851B851B851B851B841B851B851B851B861B851B851B851B841B851B861B851B861B851B851B851B851B851B861B851B851B851B841B851B851B841B841B841B851B831B831B821B811B81FF1B80FFFEFCFAF9F7F7F5F4F3F2F1F0EFEFEDEEEDEDEDECEEEEEEF0EFEEEEEFEFF0F0F0F1F1F2F2F2F2F2F1F2F3F2F4F3F4F3F5F5F5F5F5F5F6F6F5F5F6F5F6F6F7F7F7F7F7F8F7F7F7F7F8F7F8F8F8F9F8F9F9F9F9F9F9FAF8FAF9F9FAFAF9FAFAFAFBFAFBFAFBFBFBFBFCFBFBFCFCFCFBFBFCFCFBFCFCFCFCFCFCFDFCFDFDFCFDFDFDFDFDFDFCFDFDFDFDFEFDFDFDFEFDFEFEFEFEFDFFFEFEFFFEFEFFFEFFFFFFFEFEFFFFFEFFFFFEFF1B80FFFE1B80FFFF1B80FF1B80FF1B80FF1B801B801B801B801B801B801B811B801B801B801B81FF1B811B801B801B811B801B801B811B801B811B811B811B811B801B811B811B811B821B811B811B821B811B821B821B811B821B821B811B811B821B821B811B821B821B821B821B821B821B821B831B821B821B831B831B821B831B831B831B831B831B831B831B831B831B831B831B831B831B831B841B841B831B841B841B841B841B841B841B841B851B841B851B851B841B851B851B841B841B851B851B851B851B851B861B851B851B861B861B861B861B861B871B861B871B861B871B871B861B861B871B871B871B871B871B881B871B881B881B881B891B881B891B891B891B891B8A1B881B891B891B891B8A1B891B8B1B8A1B8A1B8B1B8B1B8B1B8C1B8B1B8C1B8C1B8C1B8B1B8C1B8C1B8C1B8D1B8D1B8D1B8E1B8E1B8E1B8F1B8F1B8E1B8E1B8F1B8F1B8F1B8F1B901B911B911B911B8F1B901B911B911B921B921B921B931B921B921B911B911B911B901B8F1B8F1B8D1B8C1B8D1B8B1B8A1B8A1B871B881B871B851B841B841B821B801B811B811B80FFFFFFFEFDFEFDFDFDFCFDFDFDFCFCFCFDFCFCFCFCFCFCFDFCFDFDFDFDFEFDFCFDFDFDFDFDFEFEFDFEFEFFFEFFFEFEFDFEFFFEFEFFFEFF1B80FFFFFF1B801B80FEFFFFFFFF1B801B801B801B801B801B801B801B811B811B801B811B801B801B811B801B801B811B811B811B821B811B811B821B811B821B801B811B821B811B811B821B821B821B821B821B831B821B821B821B821B821B821B831B821B831B831B831B821B821B831B821B821B831B831B821B821B821B821B831B821B821B801B801B81FFFEFDFDFCFAF8F6F6F3F1F0EFEDEDEEEEEFEEEDEEEFEEF0EFF1F1EFF0F0F0F1F1F2F2F2F3F3F3F3F2F3F3F3F3F5F4F4F5F5F5F6F5F6F5F5F6F5F6F6F7F6F7F7F8F7F8F8F8F8F7F7F8F8F8F8F9F8F9FAF9F9F9FAF9FAFAF9FAFAF9FAFAFAFAFAFBFBFBFAFBFBFCFBFBFCFCFCFCFCFCFBFDFCFDFBFCFDFCFCFDFCFDFCFDFDFDFDFDFDFDFEFEFDFEFEFDFEFDFDFEFEFDFEFEFEFEFEFEFEFFFEFEFFFFFFFEFFFEFEFFFFFEFFFFFE1B80FFFFFFFFFF1B80FFFF1B801B80FF1B801B801B801B801B801B801B801B801B811B801B801B811B801B801B801B811B801B811B801B811B801B811B811B801B811B811B811B811B811B821B811B811B821B811B821B821B821B811B821B821B821B811B821B821B811B821B821B821B821B821B831B821B821B831B831B821B831B831B831B831B831B831B831B841B831B841B831B831B831B831B841B831B841B831B841B841B841B841B841B851B841B841B851B851B841B851B851B861B851B841B851B841B851B861B851B851B861B851B861B861B861B861B871B861B861B871B871B871B871B871B861B871B871B871B871B871B881B881B881B871B891B881B891B891B891B891B881B891B891B881B891B8A1B8A1B891B8A1B8B1B8B1B8A1B8B1B8B1B8B1B8A1B8B1B8B1B8B1B8C1B8C1B8C1B8C1B8C1B8B1B8C1B8C1B8C1B8B1B8B1B8B1B8C1B8A1B8B1B8A1B8A1B881B871B851B841B841B841B831B841B831B831B821B821B831B821B811B821B811B811B821B821B811B811B811B821B811B811B821B821B811B821B811B811B811B821B821B811B821B821B811B811B821B821B811B821B821B821B821B831B821B821B821B811B821B821B821B831B831B821B831B821B821B831B821B821B831B821B831B831B841B831B841B821B831B821B841B831B831B831B841B831B841B841B841B841B831B831B841B841B841B841B841B800D523D1B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B801B800D5A464D543D333B3235303B453B523B440D5A3D0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D5A464D543D333B3235303B453B4C3B440D5A3D0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D5A54494C543D302E30303B302E30300D464352563D302E30303B302E30300D434952433D3134302E32343B302E30300D48424F583D35312E31333B35312E31330D56424F583D32372E38353B32372E38350D1E4352433D353337</binaries>
</tracerData>
|
|
|
|
|
tgbd1970 wrote: How to Convert XML to Image File,thanks
Usually by writing a program.
It's time for a new signature.
|
|
|
|
|
Hi all,
Please suggest me how to convert a word document to xsl/xslt (.doc file to xsl file). Please provide me some sample code or URL from where I can do this using C# 2.0 without using any third party tools.
Below is sample template document, in this Date, Name, Age, Address are merge field. I have to convert this template document to XLS.
<Date>
<Name>, <Age>
<Address>
Dear <Dr./Mr./Ms. Last Name>:
Below is the sample XLS for above template. (We created this manually)
<?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"
xmlns:ibex="http://www.xmlpdf.com/2003/ibex/Format">
<xsl:template match="InvitationContemplateInfo">
<fo:block margin-left="0.785in" margin-top="0.7in" margin-right="0.88in" color="gray" font-family="'Times New Roman'" font-size="11.5pt" letter-spacing="0.15pt"><xsl:value-of select="//Date"/>
<xsl:if test="//Name[. != '']"> <xsl:value-of select="//Name"/></xsl:if>
<xsl:if test="//Age[. != '']"> <xsl:value-of select="//Age"/></xsl:if>
</fo:block>
</xsl:template>
</xsl:stylesheet>
Like this we have to create for all different kind of template documents dynamically.
Thanks in advance.
Know is Drop, Unknown is Ocean
|
|
|
|
|
DO NOT CROSS POST, choose what you think is the best forum and stick with it.
Please follow this link[^] if you want to answer this question or take this thread further.
|
|
|
|
|
Hi,
Thanks for your information. I will remove this thread.
Regards,
Priya.
|
|
|
|
|
i use this javascript code, but this gives following error:
"'mappedimg' is an unexpected token. Expecting white space. Line 1, position 27."
code is here:
<body onLoad='LoadImgMap('mappedimg','cng');ChangeMappedImgSize('fitinframe','mappedimg');' onResize='LoadImgMap('mappedimg','cng');ChangeMappedImgSize('fitinframe','mappedimg');'>";
thanx in advance
|
|
|
|
|
It's just invalid javascript.
use double quotes!
<body
onLoad='LoadImgMap("mappedimg","cng");ChangeMappedImgSize("fitinframe","mappedimg");'
onResize='LoadImgMap("mappedimg","cng");ChangeMappedImgSize("fitinframe","mappedimg");'>
...
</body>
|
|
|
|
|
Hello,
I have this in my XSD File :
<xs:sequence>
<xs:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="User" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
I need to disable the order of apparition of these elements ( i.e: if i put the list of User before the list of Group ,the XML is valid and there is no problem )
I hope that my problem is clear and you can help me about this
|
|
|
|
|
Try this...
<xs:choice>
<xs:sequence>
<xs:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="User" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="User" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:choice>
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
this work, but I have an other problem with this :
The error is :
The element 'IMPORT_USERS' is used but not declared in the DTD/Schema.
To make you in the better situation ;
This is my XSD File:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="IMPORT_USERS">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="User" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="User" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:choice>
<xs:attribute name="XSDversion" use="required">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:enumeration value="1.0"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="Group">
<xs:complexType>
<xs:attribute name="Name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Description" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="User">
<xs:complexType>
<xs:attribute name="Name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Description" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
And this is my XML File
<IMPORT_USERS XSDversion="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Program Files\TEST_XSD.xsd">
<User Name="USER1" Description="user1"/>
<User Name="USER2" Description="user2"/>
<Group Name="GRP_1" Description="Niv 1"/>
<Group Name="GRP_2" Description="Niv 2"/>
</IMPORT_USERS>
Can you help me about this ?
Thank you for Help
|
|
|
|
|
The issue is this block:
<xs:choice>
<xs:sequence>
<xs:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="User" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="User" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:choice>
Specifically, that everything has a minOccurs of 0. Change it to this:
<xs:choice>
<xs:sequence>
<xs:element ref="Group" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="User" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="User" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:choice>
That way, the schema processor can determine which branch needs to be followed when validating.
And if you want to allow empty IMPORT_USERS elements, change it to this:
<xs:choice>
<xs:sequence>
<xs:element ref="Group" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="User" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="User" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence/>
</xs:choice>
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
Hello,
Thank you very much for help.
Rated
|
|
|
|
|
If I have a category, e.g. 'fish' and within that three sub-categories 'fish1', fish2' and 'fish3' is it possible to use XPath in a way to filter 'fish1' and 'fish3'?
I am looking at using XML for in memory representation of data and need to support multiple selection of data types.
Thanks.
|
|
|
|
|
I haven't tested it specifically but you should be able to use this
//fish[fish1 || fish3]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi
check out below XML
<fish>
<fish1>
<name> f1 </name>
</fish1>
<fish2>
<name> f2 </name>
</fish2>
<fish3>
<name> f3 </name>
</fish3>
</fish>
and you want to select this fish1 and fish3
then use belwo xpath
/fish/*[contains('fish1fish3',name())]
this will give you NodeList which will contain fish1 and fish3 nodes
if your filter includes number of nodes so that writing each name is inefficient then you should use another approach.
|
|
|
|
|
Hi,
I am trying to get list using xpath data[a='1']/a.
Here is the xml
<data>
<a>h</a>
<a>2</a>
<a>56</a>
<a>4</a>
<a>1</a>
</data>
I am not getting desired result say
<a>1</a> node rather that I am getting all the nodes.
We can check xpath from here http://chris.photobooks.com/xml/default.htm[^]
|
|
|
|
|
Your XPath is selecting all 'a' child nodes of the 'data' node that has an 'a' child node with content '1' - the predicate is applied to the 'data' node selection, whereas you want the predicate to be applied to the 'a' node selection. Like this:
data/a[text()='1']
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|