|
Sorry, here's the input file
|
|
|
|
|
I am attempting to make a schema where the valid options for a given enumeration are based on the content of another tag. Right now, I am attempting the following: I have an element with name="source", which can contain one of the following enumerated values {"src1", "src2"}. Now, what I want to do is to have another element with name="dependent", such that if tag "source" is set to "src1", the user has options {"opt1", "opt2"} for the "dependent" tag. If tag "source" is set to "src2", I would like the user to be able to set the "dependent" tag to one of {"opt3", "opt4"}. I am presently attempting the following:
<xs:choice>
<xs:sequence>
<xs:element name="source">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="src1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="dependent">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="opt1"/>
<xs:enumeration value="opt2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:sequence>
<xs:element name="source">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="src2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="dependent">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="opt3"/>
<xs:enumeration value="opt4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:choice> However, I am getting the error, "Elements with the same name and in the same scope must have the same type." Is there a way to accomplish what I am trying to do without forcing the tags in either option to have unique names? Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
I have a list of employees in excel file and I want to use a Search of a website for all the employees one by one.
I want to do this through my application. My quertion is how can I access that website through my application. And how to use the Search of a website with my own searching criteria.
please reply as soon as possible
|
|
|
|
|
Don't cross post
led mike
|
|
|
|
|
Hi All,
I would like to load a java script array dynamically inside xsl. Suppose I have the following xml
<srsource>
<individualsr>
<srid>srid1</srid>
<srothervalue>srothervalue1</srothervalue>
</individualsr>
<individualsr>
<srid>srid2</srid>
<srothervalue>srothervalue2</srothervalue>
</individualsr>
</srsource>
What I want to do is populate a javascript array during the xsl transformation so that I get an array like the one below when the html page is loaded.
test['srid1'] = 'srothervalue1'
test['srid2'] = 'srothervalue2' and so on..
Could anyone tell me how the above piece of code can be included inside xsl:for-each?
Thanks
Ashvish
|
|
|
|
|
Ashvish wrote: What I want to do is populate a javascript array during the xsl transformation so that I get an array like the one below when the html page is loaded.
Ashvish wrote: Could anyone tell me how the above piece of code can be included inside xsl:for-each?
Not sure I understand your question. I mean whatever you put inside the xsl:for-each is output into the result so like:
<xsl:for-each select="*/individualsr">
test['<xsl:value-of select="./srid"/>'] = '<xsl:value-of select="./srothervalue"/>';
</xsl:for-each>
led mike
|
|
|
|
|
Thanks for the reply. What I am really trying to do is something like
<xsl:variable name="user" select="Login/UserInfo/UserName"/>
<SCRIPT language="JavaScript">
<![CDATA[
...
rowA = new Object()
rowA.data1 = ']]><xsl:value-of select="$user" /><![CDATA['
rowA.data2 = 'needs'
rowA.data3 = 'help'
myTable.append_row(rowA)
...
]]>
</SCRIPT>
This works in Mozilla but not in IE. What could be the reason?
|
|
|
|
|
I don't know if you post got messed up or what but it doesn't make any sense.
led mike
|
|
|
|
|
<xs:element name="person" xmlns:xs="#unknown">
<xs:complextype>
<xs:sequence>
<xs:choice maxoccurs="unbounded">
<xs:element name="employee" type="employee">
<xs:element name="member" type="member">
|
|
|
|
|
Hey Joe, your post is empty. You probably need to read the posting instructions for posting code. They are located on the page you use to post your source code. Also make sure your question, problem, requirements, goal, is clear if you desire a helpful answer.
led mike
|
|
|
|
|
hi all,
i have got an xml of huge no. of data. http://www.propertyworld.com/xml/PW_XMLfeed_15224.xml[^].i have to keep option(some textbox) for user that they will search property by country ,region ,bedroom ,bathroom ,price.And outcomes data will be show in a datalist.I need a solution which gives a faster searching.
How can i solve this?
Waiting for reply.
Snehasish
|
|
|
|
|
snehasish wrote: i have got an xml of huge no. of data.
How huge? Are you not able to provide us with specific information?
snehasish wrote: I need a solution which gives a faster searching.
Databases Engines are designed for fast searching of large amounts of data. XML and related technologies are NOT, and are therefore not a replacement for Database Engines.
led mike
|
|
|
|
|
hi sir,
I have another xml which have 7000 properties.Underneath which have child and sub child element.I think datareader or something like this will not be helpful for searching.If you have any specific answer to solve my problem please reply me.
wating for reply.
snehasish.
|
|
|
|
|
I second led mike. You'll get orders of magnitude better performance out of SQL Express. If you're irreversibly committed to XML, use an XML Reader, but you're just not going to get great performance out of it. Scalability is another issue - assuming you've got XML files, you'll constantly be getting conflicts as two users try to open the same file.
Since you're already using XML, I suggest looking into SQL server support for it (i.e. the XML data type). I've never used it in any serious way, but you can at least take a whack at getting the best of both worlds.
|
|
|
|
|
Hi,
Thanks for your reply.I think you have understood me.I am trying to develop according with your advise.If you get any other reply me.
|
|
|
|
|
Hi,
I have created service in which I am fetching data from database write that in xmldocument and returning XMLDOCUMENT.
But it raised error in client page
"System.Xml.XmlDocument" can not serialized.
is anybody have any solution.
Thanks,
Nagraj
|
|
|
|
|
|
How does one get to execute an Excel document using an XSLT
as well as a dataset inorder to generate the Excel Document?.
|
|
|
|
|
Kagiso Gladwell wrote: How does one get to execute an Excel document using an XSLT
As far as I know, you can't. Nothing executes an Excel document that I am aware of. Microsoft Excel can load and Excel document. Maybe you should try that. I don't know what any of this has to do with XML or XSLT.
led mike
|
|
|
|
|
Hello everybody,
Where does the RSS Feed Downloader feeds in local client system? Please share your knowledge if you have any idea.
Either you love IT or leave IT...
|
|
|
|
|
|
SNI wrote: During these fews days there are some updates (XP updates) OR some group policies has been changed in my company.
I would like to know is this have any impact on SOAP communication in my application.
Why are you asking in here about an XP update or your companies group policies? WTF dude?
led mike
|
|
|
|
|
I have tried an XPath successfully in both XML Spy, and SketchPath, but I cannot make it work in MSXML
The XPath without the name() function works fine in MSXML, but as soon as I try and use name() it fails.
I have setup a prefix using SelectionNamespaces, of find
I want to find the name of the first element attached to DesiredNode.
I originally tried name(//parent:node()/find:DesiredNode/node()) which failed,
I then tried //parent:node()/find:DesiredNode/node() , this however works fine
I have also tried alternate XPaths such as name(//find:DesiredNode/*), but this fails also.
All XML Spy XPath work (without the need for using the find prefix), and if I setup the alias of find correctly in SketchPath, I also always get the correct results.
What am I doing wrong?
|
|
|
|
|
|
Yes I am, I've also used the SelectionNamespaces property to setup a namespace alias. This works fine as long as I don't introduce name()
|
|
|
|